# Update tool

```http
PUT /projects/{project_reference}/tools/{tool_id}
```

Replace the description of a structured project tool, where REST and GraphQL clear an omitted description and the MCP tool keeps it; returns the updated tool source document. Requires project.agents.write.

## Parameters

| Name                 | In    | Required | Description                                                                                                 |
| -------------------- | ----- | -------- | ----------------------------------------------------------------------------------------------------------- |
| `project_reference`  | path  | Yes      | Project slug, UUID, or domain that identifies the project.                                                  |
| `tool_id`            | path  | Yes      | Project-defined tool ID returned by list\_tools. This lookup does not load a host executable tool contract. |
| `source_target_kind` | query |          |                                                                                                             |
| `target_branch_id`   | query |          |                                                                                                             |

## Request body

| Field         | Type        | Required | Description                                                                                                                              |
| ------------- | ----------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `description` | string,null |          | Tool description. Null leaves it empty. On update, REST and GraphQL clear an omitted description and the MCP tool keeps the current one. |
| `source`      | string      |          | Complete TypeScript source of the tool file. When set it is written as-is and description is ignored.                                    |

## Responses

| Status | Description           |
| ------ | --------------------- |
| 200    | Updated tool document |
| 400    | Bad request           |
| 401    | Unauthorized          |
| 403    | Forbidden             |
| 404    | Not found             |
| 409    | Conflict              |
