Skip to main content
Glama

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
NameRequiredDescriptionDefault
docFileYesName of the documentation file to read
projectPathYesPath to the project root directory

Implementation Reference

  • 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"]
      }
    },
  • 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"]
    }
Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryanjoachim/mcp-rtfm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server