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']
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get actions that should be taken', which implies a read-only operation, but doesn't clarify what types of actions are returned (e.g., cleanup steps, notifications), whether it requires specific permissions, or how it handles errors. This leaves key behavioral traits unspecified for a tool that likely interacts with file systems.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and efficiently conveys the core functionality, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns actionable steps. It doesn't explain what 'actions' entail (e.g., list of tasks, warnings), how results are structured, or any side effects. For a tool with potential complexity in post-modification workflows, this leaves too much unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'filePath' documented as 'Path to the file'. The description doesn't add any semantic details beyond this, such as format examples or constraints. Since the schema already provides adequate parameter documentation, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('actions'), and specifies the context ('after modifying a file'). However, it doesn't explicitly differentiate from siblings like 'check_before_modification' or 'get_recent_changes', which might have overlapping contexts, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by implying usage 'after modifying a file', but it doesn't specify when to use this tool versus alternatives (e.g., 'check_before_modification' for pre-modification checks or 'get_recent_changes' for broader change tracking). No exclusions or prerequisites are mentioned, leaving significant gaps in usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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