Skip to main content
Glama

patch_parser

Parse SEARCH/REPLACE patch text and dry-run apply it to verify changes before modifying files.

Instructions

Parse SEARCH/REPLACE patch text (text=...), dry-run apply. For external patch blocks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoFile path relative to workspace_dir
textYesSEARCH/REPLACE
workspace_dirYesREQUIRED: project root (abs). reindex first if new.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv0.4.5-post9
    • addedInput schema / properties / file / description
      "File path relative to workspace_dir"
    • addedInput schema / properties / workspace_dir / description
      "REQUIRED: project root (abs). reindex first if new."
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. 'Dry-run apply' discloses that the tool is non-destructive, which is a key behavioral trait. However, it omits expected return values, error handling, and any side effects, leaving ambiguity about what happens after parsing.

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?

Two short sentences, no filler. Each clause delivers essential information: the action, the resource, the dry-run behavior, and the intended context. Ideal economy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple and the schema covers parameters, but with no output schema and no annotations, the description does not explain what the tool returns on success or failure. It is sufficient to invoke but not to interpret results, leaving a completeness gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of parameters with descriptions, so the baseline is 3. The description merely repeats that the 'text' parameter contains SEARCH/REPLACE content, adding no extra semantic value 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 clearly states the tool parses SEARCH/REPLACE patch text and dry-run applies it. 'For external patch blocks' distinguishes this from sibling tools that likely perform actual edits, providing a clear scope and resource.

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

Usage Guidelines3/5

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

The phrase 'For external patch blocks' implies usage context, but no explicit alternatives or when-not-to-use guidance is given. The condition is stated but not elaborated with exclusions or related tools.

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

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/wulun811/LiuHe'

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