# runIntegrationTool

```graphql
mutation RunIntegrationTool($input: ExecuteIntegrationToolInput!) {
  runIntegrationTool(input: $input) {
    content
    structuredContent
    isError
    _meta
  }
}
```

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.

## Arguments

| Name                                   | Type                         | Required | Description                                                                                                                                                                                                                                                                                                    |
| -------------------------------------- | ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                                | ExecuteIntegrationToolInput! | Yes      |                                                                                                                                                                                                                                                                                                                |
| `input.projectReference`               | String                       |          | Project ID or slug. Required unless the credential is bound to a project, which may omit it or name its own project. Every run needs the capability of the tool on the project: project.integrations.read, or project.integrations.connect for a tool that writes. A caller without it gets an isError result. |
| `input.toolName`                       | String!                      | Yes      | Catalog-selected tool. Read-only tools require the read capability even when executed through a mutation; other tools require the capability selected by the shared integration authorization policy.                                                                                                          |
| `input.runId`                          | String                       |          | Agent run ID for validating run-declared integration tools.                                                                                                                                                                                                                                                    |
| `input.agentId`                        | String                       |          | Agent ID for validating run-declared integration tools.                                                                                                                                                                                                                                                        |
| `input.connectionId`                   | ID                           |          |                                                                                                                                                                                                                                                                                                                |
| `input.expectedConnectionGenerationId` | ID                           |          |                                                                                                                                                                                                                                                                                                                |
| `input.args`                           | JSON                         |          | Tool arguments. Omit or send null to call the tool with {}.                                                                                                                                                                                                                                                    |

## Variables

```json
{
  "input": {
    "toolName": "string"
  }
}
```

## Responses

| Status | Description                                            |
| ------ | ------------------------------------------------------ |
| 200    | The IntegrationToolResult! in data.runIntegrationTool. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation RunIntegrationTool($input: ExecuteIntegrationToolInput!) {\n  runIntegrationTool(input: $input) {\n    content\n    structuredContent\n    isError\n    _meta\n  }\n}",
  "variables": {
    "input": {
      "toolName": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "runIntegrationTool": {
      "content": {},
      "structuredContent": {},
      "isError": false,
      "_meta": {}
    }
  }
}
```
