Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

refactor

Perform cross-file refactoring with automatic reference tracking, locating definitions and usage to apply consistent changes across scope. Ideal for renames, signature changes, and 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:{description, steps:[strings], filesAffected, estimatedChanges}, modifications:[{filePath, status:'pending_review'|'dry_run'|'error', summary, diff, stats, error?}], analysis:{occurrences, references, impact}, backend_used, processing_time, tokens_saved}. 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")

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv2.14.0
    • changedInput schema / properties / options / properties / backend / enum
      Previous value: -[
      -  "auto",
      -  "local",
      -  "deepseek",
      -  "glm",
      -  "qwen3",
      -  "gemini",
      -  "groq"
      -]New value: +[
      +  "auto",
      +  "local",
      +  "deepseek",
      +  "glm",
      +  "gemini",
      +  "groq"
      +]
  2. Added
  3. Removedv2.8.1
  4. Changed1 schema field changedv2.6.0
    • changedInput schema / properties / scope / description
      Previous value: -"Refactoring scope: function (single function), class (class and members), module (module-level), project (project-wide)"New value: +"How 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."
  5. Addedv1.3.2

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are present, so the description carries full burden. It clearly warns 'DESTRUCTIVE when review:false' and explains write behavior, dryRun, review modes, and provides detailed return shapes for both modes. This exceeds what annotations would typically cover.

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?

The description is long but every sentence earns its place: purpose, usage, alternatives, destructive warning, and return shapes are all essential. It is front-loaded with the core purpose and alternatives, then details. Slightly verbose in the return shape section, but not wastefully so.

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 tool's complexity (cross-file, multiple modes, destructive potential), the description is exceptionally complete. It covers return shapes (since no output schema exists), scope semantics, alternates, and safety behaviors. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 75% (three of four params documented). The description adds rich semantics: explains scope meaning per level, describes target, deciphers instructions, and clarifies options like review/dryRun. It compensates fully for any gaps and adds value beyond the schema.

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?

Clearly states it performs cross-file refactoring with automatic reference tracking, defines the resource (target) and scope, and gives concrete use cases (renames, signature changes, API migrations). It distinguishes itself from batch_modify and modify_file, so an agent can select it correctly.

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 (consistency between definition and callers), when not to (blind edits -> batch_modify, single-file -> modify_file), and defines scope levels. This routes the agent to the right tool unambiguously.

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

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