Skip to main content
Glama

llm_fs_edit_many

Apply bulk edits across multiple files by generating JSON edit instructions from a natural language task. Use 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?

With no annotations, the description explains the two-step process: the cheap model reads all target files and returns a JSON array of edit instructions, then Claude applies them mechanically. It discloses the default max_files cap and suggests batching. However, it does not mention error handling, permissions, or that edits are irreversible.

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 well-structured: a purpose sentence, a paragraph explaining the internal pattern, a usage sentence, and a clear parameter list. Every sentence adds value, with no redundancy or fluff. Front-loads key information.

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 moderate complexity and the presence of an output schema, the description covers the core behavior, parameter explanations, usage scenarios, and batching advice. No significant gaps remain for the agent to infer.

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?

Despite 0% schema description coverage, the description fully documents all four parameters in a docstring format, providing natural-language explanations, examples for `task`, and usage constraints for `files` and `glob_pattern`. This adds significant meaning 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?

The description starts with a clear verb-resource pair: 'Generate bulk edit instructions across multiple files.' It explicitly contrasts with llm_edit by noting it extends the pattern to many files, distinguishing it from the single-file sibling.

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 states 'Use this for cross-file refactors, bulk renames within files, or updating repeated patterns across a module,' giving clear usage context. It also advises on parameter selection (use files or glob_pattern) and batching for large refactors, though it does not explicitly tell the agent when to avoid this tool (e.g., for single-file edits).

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