Skip to main content
Glama

Apply doc patches

apply_doc_patches

Apply proposed documentation patches to a local repository, returning unified diffs in dry-run mode and writing files only when dryRun=false.

Instructions

Apply proposed documentation patches to a local checkout. Defaults to dryRun=true and returns unified diffs. Set dryRun=false to write files.

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": {
      "path": "<path>"
    },
    "name": "apply_doc_patches"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesLocal path to the repository root (writes only work locally)
dryRunNoWhen true (default), only return unified diffs without writing
runAuditFirstNoRe-run a full audit to collect patches before applying

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations at all, the description must carry the full behavioral burden. It does disclose the important safe-by-default behavior (dryRun=true returns unified diffs without writing) and that dryRun=false actually writes files, which is valuable. But it omits what writing does to existing files (overwrite vs merge), that runAuditFirst defaults to true and triggers a full audit, and any permission/precondition details.

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 short sentences, front-loaded with the action, then the default safety posture, then the opt-in write path. No filler and no repetition.

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

Completeness4/5

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

For a file-mutating tool with no annotations and no output schema, the definition covers the critical default-dry-run safety and what is returned (unified diffs). The remaining gap is runAuditFirst, whose cost and effect an agent would want to know before calling.

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%, so the schema already documents path, dryRun, and runAuditFirst. The description reinforces the dryRun semantics (default true, returns diffs, false writes files) but adds nothing about the scope or cost of runAuditFirst. Baseline 3 is appropriate when the schema does the heavy lifting.

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 and resource: applying proposed documentation patches to a local checkout, which is distinct from generating patches (generate_fix_patch) or auditing (run_full_audit). However, it does not explicitly differentiate itself from those siblings, leaving the agent to infer that this is the 'apply' step rather than the 'generate' step.

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 description gives operational guidance for dryRun ('Defaults to dryRun=true... Set dryRun=false to write files'), which implies the safe path is the default. It does not say when this tool should be chosen over generate_fix_patch or run_full_audit, and never mentions when to call runAuditFirst.

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