Skip to main content
Glama

get_section_diff

Read-only

Check whether a documentation section differs from its indexed snapshot by returning hashes and a unified diff; identical=true confirms they are in sync.

Instructions

Unified diff between the indexed snapshot and the current on-disk byte range for a section. Returns hashes + diff text; identical=true when the section is in sync with disk.

Input Schema

NameRequiredDescriptionDefault
repoYes
section_idYesTarget section ID. v1.147+ — also accepts a `doc.md#anchor` reference to a heading written with an explicit `{#id}`; an ambiguous one sets `anchor_ambiguous`, `anchor_scope`, `anchor_match_count`, `anchor_candidates` (at most 20), `anchor_candidates_truncated` and `warning`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.147.0
    • addedInput schema / properties / section_id / description
      Added value: +"Target section ID. v1.147+ — also accepts a `doc.md#anchor` reference to a heading written with an explicit `{#id}`; an ambiguous one sets `anchor_ambiguous`, `anchor_scope`, `anchor_match_count`, `anchor_candidates` (at most 20), `anchor_candidates_truncated` and `warning`."
  2. Addedv1.118.0
  3. Removedv1.100.0
  4. Addedv1.100.0
  5. Removedv1.99.0
  6. First observedv1.66.3

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses the actual return contents (hashes and diff text) and the sync signal (identical=true). It could go further, e.g. size limits or behavior on a missing section, but it adds real context the annotation does not.

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 sentences, no filler, with the core operation front-loaded and the return semantics packed into a dense second sentence.

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 two-parameter read-only tool with no output schema, the description covers the return shape and the key state flag, which is the essential information. It stops short of edge cases such as oversized diffs or missing on-disk files.

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 description coverage is 50% and the description adds no parameter guidance at all, neither for section_id's anchor-reference grammar nor for repo. The rich anchor detail lives in the schema, so the description neither compensates for the undocumented repo param nor repeats what is already covered.

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: a unified diff between the indexed snapshot and the current on-disk bytes for a section. It clearly separates itself from get_section (extraction) and check_section_delete_safe (safety), though it never names a sibling explicitly.

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: the 'identical=true when in sync' clause hints at a staleness-check use case, but there is no explicit when-to-use, when-not-to-use, or named alternative such as get_recent_changes or get_stale_pages.

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