# Run integration tool

```http
POST /integration-tools/{tool_name}/run
```

Run one integration tool synchronously by its qualified name, with provider arguments and an optional exact connection; returns the native tool result, where a provider failure or a refusal of the tool layer is a result with isError true, not an error.

## Parameters

| Name                              | In     | Required | Description |
| --------------------------------- | ------ | -------- | ----------- |
| `tool_name`                       | path   | Yes      |             |
| `x-veryfront-expected-project-id` | header |          |             |
| `x-veryfront-project-slug`        | header |          |             |

## Request body

| Field                               | Type   | Required | Description                                                                                                                                        |
| ----------------------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `arguments`                         | object |          | Tool arguments. Unknown top-level body fields are rejected, so provider arguments must be sent here.                                               |
| `run_id`                            | string |          | Agent run ID for validating run-declared integration tools                                                                                         |
| `agent_id`                          | string |          | Agent ID for validating run-declared integration tools                                                                                             |
| `connection_id`                     | string |          | Optional exact connected account to use for this call                                                                                              |
| `expected_connection_generation_id` | string |          | Require this observed generation of the selected connection. Requires connection\_id; stale selections fail before credential or provider effects. |

## Responses

| Status | Description                                                                                                                                                                                                                                                       |
| ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200    | The native tool result. A provider failure or a refusal of the tool layer is a result with isError true: a credential without the capability of the tool (project.integrations.read, or project.integrations.connect for a tool that writes) gets such a refusal. |
| 400    | invalid\_input: the body is malformed, carries an unknown top-level field or is not JSON, or the effective project does not match x-veryfront-expected-project-id.                                                                                                |
| 401    | Unauthorized                                                                                                                                                                                                                                                      |
| 403    | forbidden: the credential is not bound to a project and lacks project.integrations.read on the project named by x-veryfront-project-slug.                                                                                                                         |
| 404    | not\_found: the project is not accessible, the integration is unknown, or the integration has no such tool.                                                                                                                                                       |
| 409    | integration-connection-stale: the expected connection generation was replaced; read the connection again                                                                                                                                                          |
| 500    | internal: the run failed unexpectedly. A provider failure is an isError result, not this error.                                                                                                                                                                   |
| 502    | internal: the mock integration service did not answer the run of a tool in mock execution mode.                                                                                                                                                                   |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.                                                                                                                                                       |
