Skip to main content
Glama

md_patch

Edits a Markdown field (shared team data) with operations applied in order to the current text, without resending the whole field; any failed operation rejects the whole edit. Saved the same way as a whole-field write: permissions, format, design markers and the gist; the tester's QA protocol in result stays as is. Returns the outline, sha and the line of each operation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entity": "<entity>",
      "field": "<field>",
      "ops": "<ops>"
    },
    "name": "md_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
IDNoEntity ID; a task or feature can also be addressed by key.
keyNoTask number or feature key (#F12) when the ID is unknown.
opsYesOperations in order: replace, insertBefore, insertAfter, delete, move - a section by heading ("## Chat") or ::: doc title, line from the outline when the title repeats; move - before / after a heading (targetLine when that heading repeats) or to start / end; append - text at the end; find → replace - one occurrence, all: true for every one, expectedCount - the expected number.
fieldYesspec; result for a task; notes for a version.
entityYestask (a task or bug), feature, product or version.
expectedShaNosha from the context or a previous read; a changed text rejects the edit.
designUnlinkNotrue - the edit may remove design markers; otherwise losing a marker is rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / ops / maxItems
      Added value: +50
  2. Added

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations, which only say this is a non-read-only, non-destructive, closed-world edit. The description discloses atomicity ('any failed operation rejects the whole edit'), the persistence path (permissions, format, design markers, gist), preservation semantics for the tester's QA protocol in result, and that losing a design marker is rejected unless designUnlink is set.

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?

Purpose is front-loaded in the opening clause, and every sentence carries information with no filler. The semicolon-chained clauses make it dense, and 'the tester's QA protocol in result stays as is' is cryptic without domain knowledge, slightly hurting readability.

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?

For a 7-parameter tool with a 50-item nested ops array and no output schema, the description covers the essentials: what gets mutated, atomicity, side effects on metadata, and the shape of the return (outline, sha, line of each operation). Conflict safety is addressed through the sha/expectedSha narrative, leaving little an agent needs that is missing.

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 100% and the ops array already documents each operation, selector and repeat-handling rule in detail, so the schema does the heavy lifting. The description only reinforces ordering ('applied in order to the current text') and failure semantics that relate to expectedCount, adding modest meaning beyond structured fields.

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?

States a specific verb and resource ('Edits a Markdown field') plus the mechanism that makes it distinct: ordered operations against current text without resending the whole field, with all-or-nothing rejection. That mechanism cleanly separates it from the read-oriented siblings (md_read, md_grep) and from a whole-field write, which the description explicitly contrasts.

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?

Usage is implied rather than stated: 'without resending the whole field' hints at when a targeted patch is preferable, but there is no explicit when-to-use/when-not, no guidance on reading first to obtain the sha or outline, and no named alternative to compare against. An agent can infer intent but must reason about prerequisites itself.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources