Skip to main content
Glama
Project Scope MCP Server

Project Scope MCP Server

refactor_move_to_file

Move a function or class to a different file while automatically updating imports.

Instructions

Move a function or class to a different file. Updates imports automatically.

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": {
      "path": "<path>",
      "sourceFile": "<sourceFile>",
      "symbolName": "<symbolName>",
      "targetFile": "<targetFile>"
    },
    "name": "refactor_move_to_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRoot path of the repository
applyNoApply changes (default: false)
sourceFileYesPath to source file
symbolNameYesName of function/class to move
targetFileYesPath to target file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose a meaningful side effect ('Updates imports automatically'), but omits whether files are written to disk by default, whether the operation is atomic or produces a preview/diff, and how conflicts in the target file are handled.

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?

Two short sentences with no filler, and the core operation is front-loaded before the import-update note. Nothing is redundant.

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 mutation tool with no annotations and no output schema, the definition is adequate but thin: it does not describe what is returned (diff, summary, list of changed imports) or warn that the default is a non-applying dry run, both of which an agent would want before invoking it.

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 the schema already documents all five parameters, including the apply toggle with its false default. The description adds no meaning beyond the schema, so the baseline of 3 applies.

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 names a specific verb and resource ('Move a function or class') plus a destination ('to a different file'), so the operation is unambiguous. It does not explicitly differentiate itself from siblings like refactor_extract_function or refactor_rename, but the move-between-files scope is clear enough to select it.

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 by the tool's name and purpose; the description gives no explicit when-to-use condition, no prerequisites (working tree state, target file existence), and no guidance on choosing between this and refactor_extract_function or refactor_rename.

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