docs_update
Update project documentation by specifying modified files and change details. Ensures accurate, context-aware updates for development work across categories like frontend, backend, or database.
Instructions
Update documentation after completing development work
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Primary category of work (optional, auto-detected if not provided) | |
| context | Yes | Description of changes made | |
| files | Yes | Array of file paths that were modified |
Implementation Reference
- src/tools/documentation/index.ts:103-110 (handler)Handler function that executes the docs_update tool by calling DocumentationService.processDocumentationRequest with action 'update'.tools.set('docs_update', async (args: any) => { return await documentationService.processDocumentationRequest({ action: 'update', files: args.files, context: args.context, category: args.category }); });
- MCPTool definition including name, description, and input schema for the docs_update tool.{ 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:410-412 (registration)Registration of documentation tools (including docs_update) to the main tools Map in the MCP server.if (this.config.services.documentation && this.documentationService) { const docTools = registerDocumentationTools(this.tools, this.documentationService); this.toolDefinitions.push(...docTools);
- Core helper function implementing the documentation update logic called by the tool handler, updating READMEs and recording changes.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}` }; } }
- Service method that routes documentation requests, dispatching 'update' action to the updateDocumentation helper.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}` }; } }