Skip to main content
Glama

track_document_work

Track development work to identify required documentation updates, ensuring code changes align with project documentation requirements.

Instructions

Track the relationship between development work and documentation requirements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workTypeYesType of development work
workDescriptionYesDescription of the work being done
filePathsYesFile paths involved in the work
expectedDocumentsNoExpected documentation to be updated

Implementation Reference

  • The main handler function that executes the track_document_work tool. It logs the work, finds relevant documents, creates a work-document connection, optionally performs AI analysis to update connection strength, checks for missing docs, and returns a success response with details.
    tools.set('track_document_work', async (args: any) => { try { logger.info(`Tracking work: ${args.workType} - ${args.workDescription}`); // Find relevant existing documents const relevantDocs = await findRelevantDocuments(args.workType, args.filePaths, lifecycleService); // Create work-document connection const connection = await connectionService.createConnection({ workType: args.workType, workDescription: args.workDescription, filePaths: args.filePaths, connectedDocuments: relevantDocs.map(doc => doc.id), connectionStrength: 0.8, // Will be updated by AI analysis lastSyncedAt: dateTimeService.getCurrentTimestamp() }); // Perform AI analysis if enabled let aiInsights: string[] = []; if (config.ai.enabled && aiService) { const analysis = await aiService.calculateRelevance( args.filePaths.join(', '), args.workDescription ); aiInsights = analysis.insights; // Update connection strength based on AI analysis await connectionService.updateConnectionStrength( connection.id, analysis.score ); } // Check for missing documentation const missingDocs = args.expectedDocuments ? args.expectedDocuments.filter((doc: string) => !relevantDocs.find(existing => existing.title.includes(doc))) : []; return { success: true, connectionId: connection.id, connectedDocuments: relevantDocs.length, connectionStrength: Math.round(connection.connectionStrength * 100), aiInsights, missingDocs, message: `Work-document connection tracked successfully` }; } catch (error) { logger.error('Failed to track document work:', error); throw error; } });
  • Zod input schema for validating arguments to the track_document_work tool, defining workType enum, required description and filePaths, optional expectedDocuments.
    export const TrackDocumentWorkSchema = z.object({ workType: z.enum(['frontend', 'backend', 'database', 'electron', 'testing', 'deployment']), workDescription: z.string(), filePaths: z.array(z.string()), expectedDocuments: z.array(z.string()).optional(), });
  • MCPTool definition object registering the track_document_work tool with name, description, and JSON schema for input validation, returned by registerEnhancedTools.
    { name: 'track_document_work', description: 'Track the relationship between development work and documentation requirements', inputSchema: { type: 'object', properties: { workType: { type: 'string', enum: ['frontend', 'backend', 'database', 'electron', 'testing', 'deployment'], description: 'Type of development work' }, workDescription: { type: 'string', description: 'Description of the work being done' }, filePaths: { type: 'array', items: { type: 'string' }, description: 'File paths involved in the work' }, expectedDocuments: { type: 'array', items: { type: 'string' }, description: 'Expected documentation to be updated' } }, required: ['workType', 'workDescription', 'filePaths'] } },

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