Skip to main content
Glama

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
NameRequiredDescriptionDefault
filePathYesPath to the file

Implementation Reference

  • 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;
    }
  • 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']
      }
    },
  • 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']

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