Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

refactor

Track references to a code symbol across files and apply refactoring instructions consistently for renames, signature changes, or API migrations.

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")
optionsNo
instructionsYesRefactoring instructions (e.g., "Rename to AuthService and update all references")
Behavior5/5

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

With no annotations to rely on, the description carries the full burden. It warns with a hazard emoji: '⚠️ DESTRUCTIVE when review:false: writes to every file touched by the refactor.' It also explains dryRun's non-writing behavior and details the exact return shapes for review vs. auto-apply modes. This gives the agent a thorough understanding of consequences.

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 long but every sentence earns its place: purpose, use cases, alternatives, safety warning, and return shapes. It is front-loaded with the main purpose and uses scannable formatting (line breaks, emoji) to highlight critical information. No fluff or repetition.

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 the complexity of a cross-file refactoring tool and the absence of an output schema, the description is remarkably complete. It covers purpose, when to use, how scope works, destructive safety, the dry-run option, and both return shape variants. This is sufficient for an agent to select and invoke the tool correctly in most scenarios.

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

Parameters4/5

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

The schema already covers 75% of parameters, and the description adds value by explaining that 'scope bounds how wide the search goes' and listing the enum values inline. It also clarifies the meaning of review/dryRun by describing their effect on the return shape. However, target and instructions are not elaborated beyond the schema, so it doesn't fully compensate for the remaining 25% gap, but it does add meaningful context.

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 opens with a clear statement: 'Cross-file refactoring with automatic reference tracking.' It then details what it does ('Locates where target is defined and where it's used, then applies the instruction consistently across the matched scope') and explicitly contrasts with sibling tools (batch_modify, modify_file). This provides a specific verb+resource+scope and distinguishes from alternatives.

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?

The description explicitly states when to use it: 'Use for renames, signature changes, API migrations — any edit where consistency between definition and callers matters.' It also provides clear exclusions and alternatives: 'For the same blind edit across files without reference-awareness (cheaper), use batch_modify. For a single-file change, use modify_file.' This is exactly the level of guidance expected.

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