# tool

```graphql
query Tool($projectReference: String!, $id: String!) {
  tool(projectReference: $projectReference, id: $id) {
    id
    name
    description
    sourcePath
    editMode
    inputSchema
    outputSchema
  }
}
```

Read one project tool by its ID to inspect its input and output schemas; returns the tool. Requires project.agents.read.

## Arguments

| Name                  | Type              | Required | Description                                                                                                                    |
| --------------------- | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `projectReference`    | String!           | Yes      |                                                                                                                                |
| `id`                  | String!           | Yes      | The id of the definition, from its list.                                                                                       |
| `sourceTargetKind`    | SourceTargetKind  |          | The source to read; default runtimeTargetKind, else project. One of `project`, `main_branch`, `environment`, `preview_branch`. |
| `runtimeTargetKind`   | RuntimeTargetKind |          | Used as the source to read when sourceTargetKind is omitted. One of `main_branch`, `environment`, `preview_branch`.            |
| `targetEnvironmentId` | ID                |          | Required with the kind environment.                                                                                            |
| `targetBranchId`      | ID                |          | Required with the kind preview\_branch.                                                                                        |

## Variables

```json
{
  "projectReference": "string",
  "id": "string"
}
```

## Responses

| Status | Description             |
| ------ | ----------------------- |
| 200    | The Tool! in data.tool. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Tool($projectReference: String!, $id: String!) {\n  tool(projectReference: $projectReference, id: $id) {\n    id\n    name\n    description\n    sourcePath\n    editMode\n    inputSchema\n    outputSchema\n  }\n}",
  "variables": {
    "projectReference": "string",
    "id": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "tool": {
      "id": "string",
      "name": "string",
      "description": "string",
      "sourcePath": "string",
      "editMode": "structured",
      "inputSchema": {},
      "outputSchema": {}
    }
  }
}
```
