# Update prompt

Tool: `veryfront__update_prompt`

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

## Arguments

| Name                 | Type                  | Required | Description                                                                                                         |
| -------------------- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `project_reference`  | string                |          | Project ID or slug                                                                                                  |
| `prompt_id`          | string · min length 1 | Yes      | Provide the prompt id.                                                                                              |
| `description`        | string \| null        |          | Prompt description. Null clears it. When omitted, REST and GraphQL clear it and the MCP tool keeps the current one. |
| `content`            | string · min length 1 | Yes      | Prompt text.                                                                                                        |
| `source_target_kind` | string                |          | Where to write the prompt file: project (the default) or preview\_branch. Other values are rejected.                |
| `target_branch_id`   | string · uuid \| null |          | Preview branch to use. Required for the preview\_branch target; rejected for any other target.                      |

## 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__update_prompt",
    "arguments": {
      "prompt_id": "string",
      "content": "string"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"string\",\"name\":\"string\",\"description\":\"string\",\"content\":\"string\",\"source_path\":\"string\",\"source\":\"string\",\"edit_mode\":\"structured\",\"source_only_reasons\":[\"string\"]}"
      }
    ],
    "structuredContent": {
      "id": "string",
      "name": "string",
      "description": "string",
      "content": "string",
      "source_path": "string",
      "source": "string",
      "edit_mode": "structured",
      "source_only_reasons": [
        "string"
      ]
    }
  }
}
```
