---
title: "Update an existing dev document. Supports replace (default), append, or prepend modes. Optionally update the local_path for sync."
method: POST
path: "/api/mcp/tools/update_dev_doc"
tags: ["dev-docs"]
---

# Update an existing dev document. Supports replace (default), append, or prepend modes. Optionally update the local_path for sync.

`POST /api/mcp/tools/update_dev_doc`

## Request

- Base URL: `https://api.ainote.dev`
- URL: `https://api.ainote.dev/api/mcp/tools/update_dev_doc`
- Auth: API key in header `Authorization`

Update an existing dev document. Supports replace (default), append, or prepend modes. Optionally update the local_path for sync.

## Request body

- object
  - `title` string: Document title
  - `id` string: Document UUID
  - `category` string: Subcategory to disambiguate title
  - `content` string, required: New content
  - `mode` 'replace' | 'append' | 'prepend': Update mode (default: replace)
  - `local_path` string: Update the local file path for multi-device sync
  - `memory_type` 'state' | 'event' | 'preference': Set the memory update semantics (state | event | preference). Pass null/empty to clear.

## Response `200`

Tool executed successfully

- ToolSuccessResponse: Successful tool invocation. `content` mirrors the MCP `tools/call` result shape: an array of content blocks (text and optionally a structured resource payload).
  - `content` object[]
    - `type` 'text' | 'resource'
    - `text` string

## Other responses

- `400`: Invalid arguments or business-rule violation
- `401`: Missing or invalid McpKey

---

[API](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror.md) · [All operations](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/llms.txt) · [OpenAPI document](https://skmtc.dev/ainote/apis/ainote-mcp-openapi-mirror/revisions/f6c91d85e027?raw)
