get_modification_actions
Retrieve required actions after file modifications to ensure proper tracking and approval workflows in coding sessions.
Instructions
Get actions that should be taken after modifying a file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the file |
Implementation Reference
- src/rule-engine.ts:99-115 (handler)Core handler function that implements the get_modification_actions tool logic by returning required post-modification actions based on the file's AI metadata.getActionsAfterModification(filePath: string, metadata: AIMetadata | null): string[] { const actions: string[] = [ 'invalidate_approvals', 'update_last_modified', 'add_to_changelog' ]; if (metadata?.breakingChangesRisk === 'high') { actions.push('require_immediate_review'); } if (metadata?.tests && metadata.tests.length > 0) { actions.push('run_tests'); } return actions; }
- src/index.ts:840-845 (handler)MCP tool dispatch handler case that extracts input, parses file metadata, calls the rule engine, and returns the actions as JSON.case 'get_modification_actions': { const filePath = args.filePath as string; const fileMetadata = await this.metadataParser.parseFileMetadata(filePath); const actions = this.ruleEngine.getActionsAfterModification(filePath, fileMetadata); return { content: [{ type: 'text', text: JSON.stringify(actions, null, 2) }] }; }
- src/index.ts:639-649 (registration)Tool registration entry including name, description, and input schema definition.{ name: 'get_modification_actions', description: 'Get actions that should be taken after modifying a file', inputSchema: { type: 'object', properties: { filePath: { type: 'string', description: 'Path to the file' } }, required: ['filePath'] } },
- src/index.ts:642-647 (schema)Input schema for the get_modification_actions tool, defining the expected filePath parameter.inputSchema: { type: 'object', properties: { filePath: { type: 'string', description: 'Path to the file' } }, required: ['filePath']