Skip to main content
Glama

track_document_work

Map development tasks to required documentation updates. Specify work type, file paths, and expected documents to ensure alignment between code changes and documentation.

Instructions

Track the relationship between development work and documentation requirements

Input Schema

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

Implementation Reference

  • Main execution handler for the track_document_work tool. Creates work-document connections using services, performs optional AI relevance analysis, checks for missing docs, and returns connection 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; } });
  • Tool definition and registration within registerEnhancedTools function, including name, description, and input schema.
    { 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'] } },
  • Zod schema definition for input validation of track_document_work tool parameters.
    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(), });

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