Skip to main content
Glama

get_section_path

Read-only

Return the breadcrumb chain (root to target) for a section ID, revealing each section's title, level, and document path plus depth by walking parent links with cycle protection.

Instructions

v1.40+ — return the breadcrumb chain (root → ... → target) for a section_id. Walks parent_id upward; cycle-protected. Handles only ({id, title, level, doc_path}) per step plus depth.

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.120.0
  3. Removedv1.99.0
  4. First observedv1.66.3

TDQS

A3.5/5.0
Behavior4/5

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

With readOnlyHint=true already declaring the safety profile, the description adds genuine behavioral context beyond annotations: the upward parent_id traversal, cycle protection, and the exact per-step payload ({id, title, level, doc_path}) plus depth. This tells the agent what the result looks like without needing an output schema.

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?

Tight and front-loaded: version tag, core behavior, then return shape. Every clause earns its place, though the leading 'v1.40+' and the slightly clipped 'Handles only (...)' phrasing are marginally less readable than ideal.

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?

No output schema exists, and the description compensates by describing the return shape (breadcrumb chain, per-step fields, depth) and traversal semantics. For a two-parameter read tool this is essentially complete; only edge-case behavior (e.g. what happens when a section has no parent) is left implicit.

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%, so both parameters are fully documented in the schema (including the v1.147+ anchor handling and ambiguity fields). The description adds no parameter meaning beyond what the schema already provides, so the baseline 3 applies.

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+resource: returns the breadcrumb chain (root → ... → target) for a section_id. An agent can tell it produces an ancestry path, distinct from sibling tools like get_section_descendants. It stops short of naming the sibling it differs from, so 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the mechanics ('Walks parent_id upward') but gives no when-to-use guidance, no alternatives (e.g. get_section_context, get_toc), and no conditions that select this tool over its many section-oriented siblings. Usage is only implied by the purpose.

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