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}` }; } }

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