Skip to main content
Glama

get_modification_actions

Retrieve recommended actions to execute after modifying a file, ensuring compliance with project guidelines and safety protocols. Input the file path to generate actionable steps.

Instructions

Get actions that should be taken after modifying a file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the file

Implementation Reference

  • Main tool handler that extracts filePath argument, parses metadata using MetadataParser, calls RuleEngine.getActionsAfterModification, and returns JSON stringified actions.
    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) }] }; }
  • Tool schema definition with input validation for filePath parameter.
    { 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:639-649 (registration)
    Tool registration in the listTools response, defining name, description, and schema.
    { 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'] } },
  • Core helper function that computes the list of post-modification actions based on file metadata, including default actions and conditional ones for high-risk files or files with tests.
    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; }

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/keleshteri/mcp-memory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server