Skip to main content
Glama

docs_update

Update project documentation automatically after development changes by specifying modified files and change context to maintain accurate technical records.

Instructions

Update documentation after completing development work

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesArray of file paths that were modified
contextYesDescription of changes made
categoryNoPrimary category of work (optional, auto-detected if not provided)

Implementation Reference

  • The handler function for the 'docs_update' MCP tool. It receives input arguments and forwards them to the DocumentationService.processDocumentationRequest method with action set to 'update', which handles the actual documentation update logic.
    tools.set('docs_update', async (args: any) => { return await documentationService.processDocumentationRequest({ action: 'update', files: args.files, context: args.context, category: args.category }); });
  • The input schema definition for the 'docs_update' tool, specifying required files and context, optional category, used for MCP tool validation.
    { name: 'docs_update', description: 'Update documentation after completing development work', inputSchema: { type: 'object', properties: { files: { type: 'array', items: { type: 'string' }, description: 'Array of file paths that were modified' }, context: { type: 'string', description: 'Description of changes made' }, category: { type: 'string', enum: ['frontend', 'backend', 'electron', 'database', 'testing'], description: 'Primary category of work (optional, auto-detected if not provided)' } }, required: ['files', 'context'] } },
  • src/index.ts:411-412 (registration)
    Registration of all documentation tools, including 'docs_update', into the main MCP tools map and toolDefinitions array in the primary server entry point.
    const docTools = registerDocumentationTools(this.tools, this.documentationService); this.toolDefinitions.push(...docTools);
  • Core helper method implementing the documentation update logic for action 'update'. Orchestrates updates to category READMEs, master documentation, and change history recording.
    private async updateDocumentation(context: DocumentationContext, changes: string): Promise<DocumentationResponse> { const updates: string[] = []; try { // Update category-specific documentation const categoryUpdates = await this.updateCategoryDocumentation(context, changes); updates.push(...categoryUpdates); // Update master documentation const masterUpdates = await this.updateMasterDocumentation(context, changes); updates.push(...masterUpdates); // Record change history await this.recordChangeHistory(context, changes); updates.push('Updated change history'); return { success: true, updates, message: `Successfully updated ${updates.length} documentation sections` }; } catch (error) { return { success: false, message: `Documentation update failed: ${(error as any).message}` }; } }
  • Entry point in DocumentationService that dispatches to specific actions, calling updateDocumentation for the 'docs_update' tool's action.
    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