Skip to main content
Glama

apply_i18n_plan

Apply an approved i18n migration plan atomically to React Native, React, Next.js, or Flutter projects, including source replacements, import insertions, and locale JSON updates with dry-run support.

Instructions

Safely and atomically apply an approved i18n migration plan to the project (React Native, React, Next.js, Flutter). Performs source replacements, hook/import insertions, and locale JSON updates with stale plan protection and optional dry-run.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "apply_i18n_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
planNoThe full I18nPlan object produced by generate_i18n_plan. Either plan or planPath must be provided.
dryRunNoIf true, calculates changes, validates everything, and returns diffs without modifying files.
planPathNoPath to a JSON file containing an I18nPlan.
projectPathNoOptional project root path. If omitted, uses plan.project.root or current working directory.
createBackupNoIf true, creates .bak copies of original files before writing changes.
failOnWarningsNoIf true, aborts execution before writing if any warnings are encountered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does add real behavioral context: execution is atomic, stale-plan protection guards against applying an outdated plan, and a dry-run mode exists. It stops short of stating what a stale-plan rejection looks like, permission/auth requirements, or whether failures roll back partially written files beyond the word 'atomically'.

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

Conciseness4/5

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

A single front-loaded sentence with no filler; the action and its atomic/safe framing come first. The parenthetical framework list is useful scoping but makes the sentence dense, and the trailing 'with stale plan protection and optional dry-run' stacks qualifiers rather than separating them.

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

Completeness3/5

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

For a six-parameter, zero-annotation mutation tool with no output schema, the description should say more about what a successful apply returns and what a stale-plan abort looks like. The core write semantics are covered, but the agent is left guessing about response shape and failure reporting.

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?

Schema description coverage is 100%, so all six parameters (plan, planPath, projectPath, dryRun, createBackup, failOnWarnings) are already documented in the schema. The description only echoes the dry-run concept and adds no format, precedence, or interaction detail (e.g., plan vs. planPath resolution) beyond what structured fields provide.

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

Purpose5/5

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

States a specific verb and resource ('apply an approved i18n migration plan') and enumerates the concrete mutations it performs: source replacements, hook/import insertions, locale JSON updates. The word 'approved' plus 'apply' cleanly separates it from the sibling that produces plans (generate_i18n_plan) and from read-only auditors/validators.

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

Usage Guidelines3/5

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

The phrase 'approved i18n migration plan' implies the plan must first be generated and reviewed, and 'optional dry-run' hints at a preview-then-commit workflow, but neither is stated as an explicit rule. No alternative tool is named and no when-not-to-use condition (e.g., use validate_i18n first) is given, so usage must be inferred.

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