Skip to main content
Glama

section_neighbors

Read-only

Retrieve a section's previous/next siblings, parent, and first child in document order to navigate docs sequentially without re-querying search.

Instructions

v1.37+ — return prev/next siblings (in document order), parent, and first child for a section. Handles only (id, title, level, doc_path) — no content. Use for fast sequential navigation without re-querying search_sections.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository identifier (owner/repo or just repo name)
section_idYesTarget section ID from get_toc, search_sections, etc. 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
    • changedInput schema / properties / section_id / description
      Previous value: -"Target section ID from get_toc, search_sections, etc."New value: +"Target section ID from get_toc, search_sections, etc. 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.99.0
  4. First observedv1.66.3

TDQS

A4.3/5.0
Behavior4/5

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

readOnlyHint=true already covers the safety profile, but the description adds real behavioral context: the sibling fields are returned in document order, the payload is deliberately content-free, and a minimum version gate applies. It does not describe the anchor-ambiguity behavior surfaced by the schema parameter, but that is documented there.

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 compact sentences, each carrying distinct information: version gate + return shape, payload limits, and usage routing. The most decision-relevant content (what is returned) is front-loaded and nothing is redundant.

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?

With no output schema, the description must convey the return shape, and it does so explicitly (id, title, level, doc_path) while ruling out content fields. For a two-parameter read-only navigation tool with a readOnlyHint annotation, nothing an agent needs to call it correctly 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 description coverage is 100% and both parameters (repo, section_id) are fully documented in the schema, including the v1.147+ anchor-reference form. The description adds no parameter-level detail, so the baseline 3 applies.

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 (return) and a precisely enumerated resource: prev/next siblings in document order, parent, and first child. The detail that it handles only (id, title, level, doc_path) and no content separates it cleanly from get_section/get_section_context siblings that fetch content.

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?

"Use for fast sequential navigation without re-querying search_sections" names both the intended scenario and an alternative, so the agent knows when this beats a search call. It stops short of stating when not to use it (e.g., that get_section is required when content is needed), which is only implied by "no content."

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