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"]
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it 'Get[s] the current content,' implying a read-only operation, but doesn't cover aspects like permissions, error handling, rate limits, or what 'current' entails (e.g., cached vs. live data). This leaves significant gaps for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'content' means (e.g., text, metadata, format) or the return values, which is crucial for a read operation. With no structured data to rely on, the description should provide more context but fails to do so.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for both parameters ('docFile' and 'projectPath'). The description adds no additional meaning beyond the schema, such as examples or constraints, but the schema adequately covers the basics, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('content of a documentation file'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'read_doc' or 'get_related_docs', which likely have overlapping functionality, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'read_doc' and 'search_docs' available, there's no indication of context, exclusions, or prerequisites for selecting this specific tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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