Skip to main content
Glama
j0hanz

filesystem-mcp

by j0hanz

Edit Files

edit
Destructive

Apply exact literal text replacements across one or more files, with dry-run mode to preview changes before saving.

Instructions

Apply sequential literal string replacements to one or more files (max 5 files per call). Modes: single-file { path, edits } or per-file { files: [{ path, edits }] }. oldText must match file content exactly; include 3-5 lines of surrounding context to ensure uniqueness. Set dryRun=true to preview diffs without writing. For glob-based bulk regex replacement across many files, use replace_text instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoSingle file path; mutually exclusive with files
editsNoReplacements applied to path; not allowed when using files
filesNoPer-file entries (batch mode)
dryRunNoPreview diffs without writing to disk (default: false = apply edits)
ignoreWhitespaceNoIgnore leading/trailing whitespace differences when matching oldText

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesPer-path edit results ordered to match the input paths
summaryYes
Install Server

TDQS

A4.7/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, and the description reinforces that writes occur by contrasting dryRun. It adds useful operational detail: edits are sequential, literal, limited to 5 files per call, and require exact matches with context. It could further state failure behavior when oldText is not found, but the key behavioral traits are disclosed.

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?

Three dense sentences cover purpose, modes, matching requirements, dry-run usage, and the key alternative. The most important constraint is front-loaded, and every sentence earns its place.

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 output schema and full parameter descriptions, the tool definition leaves no critical gap: modes, limits, matching behavior, dry-run previews, and the intended alternative are all covered. An agent has enough information to decide when to invoke edit and how to formulate a safe call.

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?

Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by clarifying that replacements are applied sequentially, explaining the two call modes, and reinforcing the 5-file cap and exact-match requirement.

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 precise verb and object: 'Apply sequential literal string replacements to one or more files.' It clearly distinguishes this tool from replace_text, which handles glob-based bulk regex replacement, so an agent can tell them apart immediately.

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 gives an explicit routing rule: use replace_text for glob-based bulk regex across many files. It also directs users to dryRun=true for previewing diffs, clarifying the safe way to test edits before applying them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/j0hanz/filesystem-mcp'

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