Skip to main content
Glama

index_patch

Edits the root or Map/Journal index.md by applying old/new string patches with if_match, returning content hash and findings; use concept_patch for expanded indexes.

Instructions

Like concept_patch, for the root or a Map/Journal curated index.md (same edit forms; if_match required, from index_get with_hash). An expanded concept's own index.md is refused (expanded_index): use concept_patch. Returns path, content_hash, replacements, findings.

Input Schema

NameRequiredDescriptionDefault
pathNoEmpty (root) or a Map/Journal name
editsNo
reasonNoWhy (commit trailer)
if_matchYes
new_stringNo
old_stringNo
replace_allNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses the optimistic-concurrency requirement (if_match), a refusal condition with its error code, and the return payload (path, content_hash, replacements, findings). It omits permission/auth needs and whether edits are atomic, 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences that front-load the analogous tool and the target resource, then cover prerequisites, exclusions, and return values. Dense but every clause earns its place; the 'Like concept_patch' dependency is the only minor cost.

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?

For a 7-parameter mutation tool with no annotations, no output schema, and 29% schema coverage, the description covers routing, concurrency, error handling, and returns, but leaves several parameters (edits shape, reason, replace_all) under-explained. Adequate but with clear gaps.

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?

Schema coverage is only 29%, so the description must compensate. It documents if_match's origin and defers edit-form semantics to concept_patch ('same edit forms'), but says nothing about edits structure, replace_all, or reason beyond the schema's brief hints. Partial compensation only.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (patch) and resource (root or Map/Journal curated index.md) and explicitly distinguishes itself from concept_patch for expanded-concept indexes. The reliance on 'Like concept_patch' means the agent must know what that sibling does, so it is clear but not fully self-contained.

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?

Names the prerequisite (if_match from index_get with_hash) and the exclusion case (an expanded concept's own index.md is refused with expanded_index), routing to concept_patch. Clear context and a named alternative, though it doesn't spell out the full when-to-use conditions for every index type.

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