Skip to main content
Glama

get_mcp_doc_section

Retrieve a specific section of MCP documentation using a key and section title to locate and access relevant content for MCP server projects.

Instructions

Get a specific section of MCP documentation by key and section title

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
section_titleNo

Implementation Reference

  • Main handler function that validates input using Zod schema, initializes docs storage, retrieves the specific documentation section using helper function, handles errors, and returns structured result.
    export async function getMcpDocSection(
      options: DocSectionOptions
    ): Promise<{ success: boolean; message: string; content?: string }> {
      try {
        // Validate options
        const validatedOptions = docSectionSchema.parse(options);
    
        // Initialize docs storage if it doesn't exist yet
        await initDocsStorage();
    
        // Get the documentation section
        const content = await getDocumentationSection(
          validatedOptions.key,
          validatedOptions.section_title
        );
    
        if (!content) {
          return {
            success: false,
            message: validatedOptions.section_title
              ? `Section "${validatedOptions.section_title}" not found in documentation "${validatedOptions.key}"`
              : `Documentation "${validatedOptions.key}" not found`,
          };
        }
    
        return {
          success: true,
          message: validatedOptions.section_title
            ? `Retrieved section "${validatedOptions.section_title}" from documentation "${validatedOptions.key}"`
            : `Retrieved documentation "${validatedOptions.key}"`,
          content,
        };
      } catch (error: any) {
        console.error(chalk.red("Error retrieving documentation section:"), error);
        return {
          success: false,
          message: `Error retrieving documentation section: ${
            error.message || String(error)
          }`,
        };
      }
    }
  • Zod schema for input validation of the get_mcp_doc_section tool parameters.
    export const docSectionSchema = z.object({
      key: z.string().min(1),
      section_title: z.string().optional(),
    });
  • src/server.ts:162-182 (registration)
    Registration of the get_mcp_doc_section tool on the MCP server, including inline Zod schema, description, and handler invocation.
    server.tool(
      "get_mcp_doc_section",
      "Get a specific section of MCP documentation by key and section title",
      {
        key: z.string().min(1),
        section_title: z.string().optional(),
      },
      async (params: DocSectionOptions) => {
        const result = await getMcpDocSection(params);
    
        return {
          content: [
            {
              type: "text",
              text:
                result.success && result.content ? result.content : result.message,
            },
          ],
        };
      }
    );
  • TypeScript interface defining the input options for the get_mcp_doc_section tool.
    export interface DocSectionOptions {
      key: string;
      section_title?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'Get[s] a specific section', implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns errors for missing keys, or details the output format. This leaves significant gaps for a tool with two parameters.

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 front-loads the core action and parameters without any wasted words. It's appropriately sized for the tool's complexity, making it easy to parse quickly.

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 complexity (2 parameters, no annotations, no output schema), the description is incomplete. It doesn't cover behavioral aspects like error handling or output structure, and with low schema coverage, it fails to fully explain parameter meanings. This leaves the agent with insufficient context for reliable use.

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

Parameters2/5

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

The schema description coverage is 0%, so the description must compensate. It mentions 'key and section title', which maps to the two parameters, but doesn't explain what a 'key' represents (e.g., document ID, path) or what 'section_title' entails (e.g., exact match, case sensitivity). This adds minimal value beyond naming the parameters.

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 the resource 'specific section of MCP documentation', making the purpose understandable. It distinguishes from siblings like 'search_mcp_docs' by focusing on retrieval by key and title rather than searching. However, it doesn't explicitly differentiate from 'save_mcp_docs' or other siblings, keeping it from a perfect 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 like 'search_mcp_docs' or 'save_mcp_docs'. It lacks context on prerequisites, such as needing existing documentation keys, and doesn't mention any exclusions or best practices for usage.

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/CaptainCrouton89/mcp-maker'

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