Skip to main content
Glama
Platano78

Smart-AI-Bridge

refactor

Perform cross-file refactoring with automatic reference tracking. Locate symbol definitions and usages, then apply changes consistently across selected scope for renames, API migrations, or signature edits.

Instructions

Cross-file refactoring with automatic reference tracking. Locates where target is defined and where it's used, then applies the instruction consistently across the matched scope. Use for renames, signature changes, API migrations — any edit where consistency between definition and callers matters. scope bounds how wide the search goes: 'function' / 'class' / 'module' / 'project'. For the same blind edit across files without reference-awareness (cheaper), use batch_modify. For a single-file change, use modify_file. ⚠️ DESTRUCTIVE when review:false: writes to every file touched by the refactor. dryRun:true produces the plan without writing. Returns: shape depends on mode. review:true (default) or dryRun:true: {success, status:'pending_review'|'dry_run', scope, target, instructions, plan:{filesToModify, references}, modifications:[{filePath, diff, summary}], backend_used, processing_time}. Auto-apply (review:false): {success, status:'completed'|'partial', scope, target, instructions, filesModified, filesTotal, modifications:[{filePath, status:'written'|'error', summary, error?}], backend_used, processing_time}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesHow wide the reference search goes. `function` = the target function and its direct callers in the same module. `class` = the class definition, its methods, and call sites within the same module. `module` = the file containing `target` plus any file that imports from it. `project` = whole-repo search (slowest, most thorough). Pick the narrowest scope that covers your actual change.
targetYesSymbol or pattern to refactor (e.g., "UserService", "handleLogin")
instructionsYesRefactoring instructions (e.g., "Rename to AuthService and update all references")
optionsNo
Behavior5/5

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

No annotations provided, so description fully carries burden. Clearly warns that tool is destructive when review:false, writes to every file touched. Explains dryRun:true behavior and return shapes for both review and auto-apply modes.

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?

Description is efficient: leads with purpose, then usage, alternatives, warnings, and return shapes. Every sentence earns its place; no fluff. Well-structured for quick comprehension.

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

Completeness5/5

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

Given no output schema, description fully documents return shapes for both review and auto modes. Covers all necessary details for correct invocation: parameters, side effects, modes, and error information.

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

Parameters5/5

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

Schema has high coverage (all parameters described), but description adds extra meaning: clarifies scope enum values, provides examples for target and instructions, and details return shapes beyond schema. This goes beyond the structured data.

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?

The description clearly states 'Cross-file refactoring with automatic reference tracking' and specifies it locates where target is defined and used, then applies instructions consistently. It distinguishes from sibling tools batch_modify and modify_file by contrasting use cases.

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

Usage Guidelines5/5

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

Explicitly lists when to use (renames, signature changes, API migrations) and when not (blind edits use batch_modify, single-file use modify_file). Provides guidance on scope parameter to bind search width.

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/Platano78/Smart-AI-Bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server