Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

modify_file

Edit files by describing the desired change in natural language. The AI applies the edit, returns a unified diff for approval, and writes only after you confirm, with automatic backups.

Instructions

Edit an existing file by describing the change in natural language. The local LLM reads the file, applies the edit using SEARCH/REPLACE blocks (with a size-ratio safety net that refuses writes <50% of the original), and returns a unified diff for Claude to approve (review:true, default) or writes directly (review:false). Use for non-trivial edits where the AI does the work. For a known string→string replacement Claude can do itself, use native Edit. For writing a fully-specified content string to a file, use write_files_atomic. For the same instruction across MANY files, use batch_modify. For symbol renames + cross-file reference updates, use refactor. ⚠️ DESTRUCTIVE when review:false: writes directly to filePath. A backup at <path>.backup.<timestamp> is created unless backup:false is also passed (a warning is logged in that case). dryRun:true produces the diff without writing. Returns: shape depends on mode. review (default): {success, status:'pending_review'|'pending_review_truncated', filePath, diff, modifiedContent, summary, stats, warnings, was_truncated, approval_options, retry_attempts}. dryRun: {success, status:'dry_run', filePath, diff, summary, stats, warnings, backend_used, processing_time}. auto-write: {success, status:'written', filePath, diff, summary, stats, backupCreated, backend_used, processing_time, tokens_saved}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsNo
filePathYesPath to the file to modify
instructionsYesNatural language edit instructions (e.g., "Add rate limiting to the login function")
Behavior5/5

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

With no annotations provided, the description fully carries the transparency burden. It discloses the edit mechanism (SEARCH/REPLACE blocks), the size-ratio safety net, the review/write behavior, destructive potential when review:false, backup creation and disabling conditions, dryRun behavior, and detailed return shapes. This is exceptionally transparent.

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 information-dense and well-structured: purpose first, then usage guidance, safety warnings, and return shapes. Every sentence provides value, though the returns section is quite verbose. Given the lack of an output schema, the detail is justified, but it could be slightly condensed without losing clarity.

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?

The description is highly complete given the tool's complexity, the absence of annotations, and the absence of an output schema. It covers the mechanism, safety constraints, option behaviors, and all three return shapes (review, dryRun, auto-write). This is a model example of a self-contained tool description.

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?

The description adds substantial meaning beyond the schema by explaining the behavioral impact of parameters: review controls approval vs. direct write, backup defaults to true but can be disabled, dryRun produces diff without writing. It also explains how options like backend and contextFiles relate to the editing process. This goes well beyond the schema's field descriptions.

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 the tool's function: 'Edit an existing file by describing the change in natural language.' It identifies the specific resource (file) and action (edit), and distinguishes from siblings by naming alternative tools for different scenarios (native Edit, write_files_atomic, batch_modify, refactor).

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?

Provides explicit usage guidance: 'Use for non-trivial edits where the AI does the work.' Then lists clear alternatives with their appropriate contexts, such as 'For a known string→string replacement Claude can do itself, use native Edit' and 'For the same instruction across MANY files, use batch_modify.' This is exemplary when-to-use guidance.

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