get_doc_content
Retrieve the current content of a specified documentation file within a project directory, enabling quick access to essential information. Designed for efficient management of project documentation.
Instructions
Get the current content of a documentation file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docFile | Yes | Name of the documentation file to read | |
| projectPath | Yes | Path to the project root directory |
Implementation Reference
- src/index.ts:1030-1055 (handler)Handler function that reads the content of a specified documentation file from .handoff_docs directory and returns it as text content.case "get_doc_content": { const { projectPath, docFile } = request.params.arguments as { projectPath: string; docFile: string; }; try { const filePath = `${projectPath}/.handoff_docs/${docFile}`; const content = await fs.readFile(filePath, "utf8"); return { content: [ { type: "text", text: content } ] }; } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : String(error); throw new McpError( ErrorCode.InternalError, `Error reading documentation: ${errorMessage}` ); } }
- src/index.ts:481-497 (registration)Tool registration in the list of tools, including name, description, and input schema requiring projectPath and docFile.name: "get_doc_content", description: "Get the current content of a documentation file", inputSchema: { type: "object", properties: { projectPath: { type: "string", description: "Path to the project root directory" }, docFile: { type: "string", description: "Name of the documentation file to read" } }, required: ["projectPath", "docFile"] } },
- src/index.ts:483-496 (schema)Input schema definition for the get_doc_content tool, specifying projectPath and docFile as required string parameters.inputSchema: { type: "object", properties: { projectPath: { type: "string", description: "Path to the project root directory" }, docFile: { type: "string", description: "Name of the documentation file to read" } }, required: ["projectPath", "docFile"] }