Skip to main content
Glama

llm_fs_edit_many

Apply natural language bulk edits across multiple files. Ideal for cross-file refactors and pattern updates.

Instructions

Generate bulk edit instructions across multiple files.

Extends the ``llm_edit`` pattern to many files at once: the cheap model
reads all target files and returns a JSON array of ``{file, old_string,
new_string}`` edit instructions. Claude applies them mechanically.

Use this for cross-file refactors, bulk renames within files, or updating
repeated patterns across a module.

Args:
    task: Natural-language description of what to change, e.g.
        "replace all `import sqlite3` with `import aiosqlite as sqlite3`"
        or "update the copyright year from 2024 to 2025 in all file headers".
    files: Explicit list of file paths to process.
    glob_pattern: Glob pattern to find files (e.g. "src/**/*.py"). Use
        either ``files`` or ``glob_pattern``, not both.
    max_files: Cap on files processed in one call (default 20). Raise if
        you need more — but consider splitting into batches for large refactors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYes
filesNo
glob_patternNo
max_filesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Describes the process: cheap model reads files, returns JSON array, Claude applies edits. Mentions max_files and batching. No annotations given, but description adequately covers behavior. Minor lack of side-effect or permission details.

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?

Well-structured with title, paragraph, and Args list. Front-loaded with purpose. Slightly verbose but clear and informative.

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?

Covers behavior, parameters, usage, and return value (JSON array of edit instructions). With output schema present, description is complete for an agent to correctly invoke the tool.

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 description coverage is 0%, so description must compensate. Provides detailed explanations for all four parameters: task (natural-language), files (explicit list), glob_pattern (glob pattern), max_files (cap, default 20). Adds significant meaning.

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 the tool generates bulk edit instructions across multiple files, extending the llm_edit pattern. Distinguishes itself by handling many files at once, and sibling tools like llm_edit and llm_fs_find are contextually present.

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 recommends use for cross-file refactors, bulk renames, updating repeated patterns. Provides guidance on not using `files` and `glob_pattern` together, and suggests batching for large refactors.

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/ypollak2/llm-router'

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