Skip to main content
Glama

docs_reference

Find relevant documentation for development tasks by analyzing your code files and work context, supporting categories like frontend, backend, and database work.

Instructions

Find and reference relevant documentation for development work

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesArray of file paths being worked on
contextYesContext or description of the work being done
categoryNoPrimary category of work (optional, auto-detected if not provided)
workTypeNoType of work being done (optional, auto-detected if not provided)

Implementation Reference

  • MCP tool handler function for 'docs_reference' that delegates the request to DocumentationService.processDocumentationRequest with action 'reference'.
    tools.set('docs_reference', async (args: any) => {
      return await documentationService.processDocumentationRequest({
        action: 'reference',
        files: args.files,
        context: args.context,
        category: args.category,
        workType: args.workType
      });
    });
  • MCPTool schema definition including inputSchema for validating 'docs_reference' tool inputs.
    {
      name: 'docs_reference',
      description: 'Find and reference relevant documentation for development work',
      inputSchema: {
        type: 'object',
        properties: {
          files: {
            type: 'array',
            items: { type: 'string' },
            description: 'Array of file paths being worked on'
          },
          context: {
            type: 'string',
            description: 'Context or description of the work being done'
          },
          category: {
            type: 'string',
            enum: ['frontend', 'backend', 'electron', 'database', 'testing'],
            description: 'Primary category of work (optional, auto-detected if not provided)'
          },
          workType: {
            type: 'string',
            enum: ['implement', 'fix', 'refactor', 'optimize', 'test', 'deploy', 'security'],
            description: 'Type of work being done (optional, auto-detected if not provided)'
          }
        },
        required: ['files', 'context']
      }
    },
  • src/index.ts:410-413 (registration)
    Top-level registration call that invokes registerDocumentationTools to add 'docs_reference' and other doc tools to the MCP server tools map and definitions.
    if (this.config.services.documentation && this.documentationService) {
      const docTools = registerDocumentationTools(this.tools, this.documentationService);
      this.toolDefinitions.push(...docTools);
    }
  • Core service method that handles the 'reference' action called by the docs_reference tool handler, building context and invoking referenceDocumentation.
    async processDocumentationRequest(request: DocumentationRequest): Promise<DocumentationResponse> {
      try {
        const context = this.buildDocumentationContext(request);
        
        if (request.action === 'reference') {
          return await this.referenceDocumentation(context);
        } else if (request.action === 'update') {
          return await this.updateDocumentation(context, request.context);
        } else {
          throw new Error(`Unknown action: ${request.action}`);
        }
      } catch (error: any) {
        return {
          success: false,
          message: `Documentation processing failed: ${error.message}`
        };
      }
    }
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 mentions 'Find and reference' but doesn't explain what 'reference' entails (e.g., does it return links, copy text, or something else?), whether it requires authentication, has rate limits, or what the output looks like. For a tool with no annotations, this leaves critical behavioral traits unspecified.

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

Conciseness4/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 unnecessary words. It's appropriately sized and front-loaded, making it easy to parse, though it could be slightly more informative without sacrificing brevity.

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 tool's complexity (4 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what the tool returns, how it interacts with parameters, or behavioral aspects like error handling. For a tool that likely outputs documentation references, the lack of output details and behavioral context makes it inadequate for full understanding.

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?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no meaning beyond what the schema provides—it doesn't explain how parameters like 'files' or 'context' influence the tool's behavior or relate to finding documentation. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding.

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

Purpose3/5

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

The description 'Find and reference relevant documentation for development work' states a clear purpose with a verb ('Find and reference') and resource ('documentation'), but it's vague about what 'reference' means and doesn't distinguish this tool from sibling tools like 'docs_search' or 'generate_documentation_report'. It provides a general function without specificity about how it differs from other documentation-related tools.

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 offers no guidance on when to use this tool versus alternatives like 'docs_search' or 'generate_documentation_report'. It lacks explicit when/when-not instructions or mentions of prerequisites, leaving the agent to infer usage based on the tool name and parameters alone, which is insufficient for effective tool selection.

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

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/Ghostseller/CastPlan_mcp'

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