Skip to main content
Glama

llm_fs_edit_many

Generate bulk edit instructions across multiple files by describing the change in natural language. Returns a JSON array of find-and-replace actions for Claude to apply.

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
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It explains that a cheap model reads files and returns a JSON array of edit instructions, and that Claude applies them mechanically. It also notes the default max_files and suggests batching for large refactors. However, it does not disclose potential side effects or required permissions, leaving some behavioral gaps.

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 concise and well-structured: a clear summary line, an explanation of the pattern, usage guidance, and an Args section. Every sentence adds value without redundancy.

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 (multiple parameters, batch editing) and the absence of annotations, the description provides sufficient context for an agent to understand the tool's operation and output. The existence of an output schema reduces the need for describing return values.

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?

With 0% schema description coverage, the description adds significant meaning: it provides examples for 'task', explains the exclusive use of 'files' or 'glob_pattern', and describes 'max_files' with its default and batching advice. This fully compensates for the schema's lack of parameter 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 purpose as generating bulk edit instructions across multiple files, extending the llm_edit pattern. It distinguishes from sibling tools like llm_edit and llm_fs_rename by specifically addressing multi-file edits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool: 'Use this for cross-file refactors, bulk renames within files, or updating repeated patterns across a module.' It also clarifies that files and glob_pattern should not be used together. However, it lacks explicit guidance on when not to use it, such as scenarios better suited for other tools.

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