Skip to main content
Glama

plan_rename

Finds every occurrence of a string in a repository, classifies each by context, and returns rename-safe edits plus skip reasons so you can plan safe single or batch renames.

Instructions

Finds all locations where a string appears in a repo and classifies each by context: string literal, import path, class name, code identifier, documentation, or comment. Returns structured edit entries for rename-safe occurrences and skip entries with reasons for the rest. Accepts a single rename or a batch mapping.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>",
      "old_name": "<old_name>",
      "new_name": "<new_name>"
    },
    "name": "plan_rename"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name (as shown in list_repos)
new_nameYesThe replacement string
old_nameYesThe string to find and rename

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does useful work: it enumerates the classification categories, explains that results split into safe edits and skipped occurrences with reasons, and states the input forms accepted. It still only implies that nothing is mutated (a 'plan') rather than stating it, and says nothing about indexing prerequisites or cost on a large repo.

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?

Three tightly packed sentences, front-loaded with the core verb and resource, with no filler. The dense classification list earns its place because it defines the output contract that no output schema provides.

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

Completeness4/5

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

For a planning tool with no annotations and no output schema, the description covers the essential missing piece: what comes back (edit entries versus skip entries with reasons). Remaining gaps are moderate rather than critical — whether the repo must be indexed, and how this differs operationally from rename_everywhere and batch_plan_rename.

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?

All three parameters are fully documented in the schema, so the baseline is 3. The description adds little per-parameter meaning beyond noting a batch mapping form, which the schema does not actually represent (old_name/new_name are plain strings), creating a mild mismatch rather than added clarity.

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 opens with a specific verb+resource: it finds every occurrence of a string in a repo and classifies each by context, returning rename-safe edits versus skip entries. That clearly separates it from an execution tool like rename_everywhere. It does not explicitly name a sibling or state the planning-only scope, so it stops short of a 5.

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?

Usage is only implied: the notion of 'edit entries for rename-safe occurrences and skip entries with reasons' suggests it is the dry-run step before applying a rename. There is no explicit when-to-use or when-not-to-use guidance, and the closing line 'Accepts a single rename or a batch mapping' blurs the boundary with the batch_plan_rename sibling rather than clarifying it.

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