update_doc
Modify document details in Dart MCP Server by updating its title, text content, and folder location using the document ID.
Instructions
Update an existing doc. You can modify its title, text content, and folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | The title of the folder to place the doc in | |
| id | Yes | The 12-character alphanumeric ID of the doc | |
| text | No | The text content of the doc, which can include markdown formatting | |
| title | No | The title of the doc |
Input Schema (JSON Schema)
{
"properties": {
"folder": {
"description": "The title of the folder to place the doc in",
"type": "string"
},
"id": {
"description": "The 12-character alphanumeric ID of the doc",
"pattern": "^[a-zA-Z0-9]{12}$",
"type": "string"
},
"text": {
"description": "The text content of the doc, which can include markdown formatting",
"type": "string"
},
"title": {
"description": "The title of the doc",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
}
Implementation Reference
- index.ts:458-465 (handler)Handler for the update_doc tool. Validates the document ID using getIdValidated, casts arguments to DocUpdate type, calls DocService.updateDoc with the ID and update data, and returns the updated document as a JSON string in the tool response.case UPDATE_DOC_TOOL.name: { const id = getIdValidated(args.id); const docData = args as DocUpdate; const doc = await DocService.updateDoc(id, { item: docData }); return { content: [{ type: "text", text: JSON.stringify(doc, null, 2) }], }; }
- tools.ts:534-562 (schema)Schema definition for the update_doc tool, specifying input parameters: required 'id' (12-char alphanumeric), optional 'title', 'text', and 'folder'.export const UPDATE_DOC_TOOL: Tool = { name: "update_doc", description: "Update an existing doc. You can modify its title, text content, and folder.", inputSchema: { type: "object", properties: { id: { type: "string", description: "The 12-character alphanumeric ID of the doc", pattern: "^[a-zA-Z0-9]{12}$", }, title: { type: "string", description: "The title of the doc", }, text: { type: "string", description: "The text content of the doc, which can include markdown formatting", }, folder: { type: "string", description: "The title of the folder to place the doc in", }, }, required: ["id"], }, };
- index.ts:192-214 (registration)Registration of all tools including UPDATE_DOC_TOOL in the TOOLS array, which is served via ListToolsRequestSchema.const TOOLS = [ // Config GET_CONFIG_TOOL, // Tasks CREATE_TASK_TOOL, LIST_TASKS_TOOL, GET_TASK_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, // Docs CREATE_DOC_TOOL, LIST_DOCS_TOOL, GET_DOC_TOOL, UPDATE_DOC_TOOL, DELETE_DOC_TOOL, // Comments ADD_TASK_COMMENT_TOOL, LIST_TASK_COMMENTS_TOOL, // Other GET_DARTBOARD_TOOL, GET_FOLDER_TOOL, GET_VIEW_TOOL, ];