# Read tool source

```http
GET /projects/{project_reference}/tools/{tool_id}/source
```

Read the editable source behind one project tool before changing it; returns the tool with its source text, edit mode and the reasons it can only be edited as source. Requires project.agents.read.

## 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 |          |                                                                                                             |

## Responses

| Status | Description   |
| ------ | ------------- |
| 200    | Tool document |
| 400    | Bad request   |
| 401    | Unauthorized  |
| 403    | Forbidden     |
| 404    | Not found     |
