create_doc
Generate and organize documents in Dart projects by specifying title, content, and folder. Streamline project management with structured documentation.
Instructions
Create a new doc in Dart. You can specify title, text content, and folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | The title of the folder to place the doc in | |
| text | No | The text content of the doc, which can include markdown formatting | |
| title | Yes | The title of the doc (required) |
Input Schema (JSON Schema)
{
"properties": {
"folder": {
"description": "The title of the folder to place the doc in",
"type": "string"
},
"text": {
"description": "The text content of the doc, which can include markdown formatting",
"type": "string"
},
"title": {
"description": "The title of the doc (required)",
"type": "string"
}
},
"required": [
"title"
],
"type": "object"
}
Implementation Reference
- index.ts:436-444 (handler)The handler function for the 'create_doc' tool in the MCP server's CallToolRequestSchema handler. It extracts arguments as DocCreate, calls DocService.createDoc, and returns the result as JSON text.case CREATE_DOC_TOOL.name: { const docData = args as DocCreate; const doc = await DocService.createDoc({ item: docData, }); return { content: [{ type: "text", text: JSON.stringify(doc, null, 2) }], }; }
- tools.ts:492-515 (schema)The schema definition for the 'create_doc' tool, including name, description, and inputSchema with properties for title (required), text, and folder.export const CREATE_DOC_TOOL: Tool = { name: "create_doc", description: "Create a new doc in Dart. You can specify title, text content, and folder.", inputSchema: { type: "object", properties: { title: { type: "string", description: "The title of the doc (required)", }, 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: ["title"], }, };
- index.ts:192-214 (registration)Registration of the CREATE_DOC_TOOL in the TOOLS array, which is returned by the ListToolsRequestSchema handler to expose available tools.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, ];