Skip to main content
Glama
Platano78

Smart-AI-Bridge

batch_modify

Apply a single natural-language instruction to each file in a batch, with options for atomic rollback on failure or best-effort partial success.

Instructions

Apply the SAME natural-language instruction independently to each file in files. Use for sweeping consistent edits — 'add JSDoc to every exported function in lib/', 'replace console.log with logger.info'. transactionMode:'all_or_nothing' (default) rolls every file back if any one fails; 'best_effort' keeps the successful edits and reports failures. This tool does NOT find cross-file references — each file is edited in isolation. For symbol renames that must update callers, use refactor. For one file with custom instructions, use modify_file. ⚠️ DESTRUCTIVE when review:false: writes to every file in the batch (per-file backups at <path>.backup.<timestamp>). The default review:true returns the proposed diffs without writing. Returns: shape depends on review. review:true (default): {success, status:'pending_review', filesProcessed, patterns, instructions, modifications:[{filePath, status:'pending_review'|'error', summary, diff, stats, error?}], successCount, failureCount, approval_instructions, tokens_saved}. review:false (auto-write): {success, status:'completed'|'partial', filesProcessed, modifications:[{filePath, status:'written'|'error', summary, stats, error?}], successCount, failureCount}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesFile paths or glob patterns to modify
instructionsYesInstructions to apply to each file
optionsNo
Behavior5/5

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

With no annotations provided, the description fully discloses destructive behavior when review:false, mentions backup creation, explains transactional rollback behavior, and details both review and auto-write return shapes.

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 a single paragraph but well-organized: tool definition, usage examples, transaction modes, exclusions, warnings, and return shapes. Every sentence adds necessary context without 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 tool's complexity (batch mode, two transaction modes, destructive behavior, varied return shapes), the description covers all essential aspects: what it does, when to use, how to use, risk details, and expected outputs. No output schema exists, but return shapes are described thoroughly.

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 input schema covers 67% of parameters with descriptions, so baseline is 3. The description adds value by explaining that instructions are natural-language and the same for all files, and elaborates on transaction modes beyond the schema enum descriptions. However, it doesn't add syntax details for files or options beyond what's in 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?

The description uses a specific verb 'Apply' and resource 'each file in files' with clear examples of sweeping edits. It distinguishes itself from sibling tools 'refactor' and 'modify_file' by explicitly stating what it does not do.

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 provides explicit when-to-use guidance (sweeping consistent edits) and when-not-to-use (cross-file references, single file with custom instructions), naming alternative tools 'refactor' and 'modify_file'. It also explains transaction mode choices.

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