# Get file diff

Tool: `veryfront__get_file_diff`

Return file diff. Requires project.files.read.

## Arguments

| Name                | Type                     | Required | Description                                                                                 |
| ------------------- | ------------------------ | -------- | ------------------------------------------------------------------------------------------- |
| `file_path`         | string · min length 1    | Yes      | Project-relative source path, or the file ID.                                               |
| `ref`               | string                   |          | Content to read: main, branch:<name-or-id>, release:<version> or env:<name>. Omit for main. |
| `source_ref`        | string                   |          | Version ID to compare from. Required except on a branch, which compares against main.       |
| `context_lines`     | integer · min 0 · max 10 |          | Context lines around a change, 0 to 10 (default 3).                                         |
| `project_reference` | string                   |          | Project ID or slug (defaults to the current project)                                        |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__get_file_diff",
    "arguments": {
      "file_path": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"path\":\"string\",\"diff\":\"string\",\"additions\":0,\"deletions\":0}"
      }
    ],
    "structuredContent": {
      "path": "string",
      "diff": "string",
      "additions": 0,
      "deletions": 0
    }
  }
}
```
