Skip to main content
Glama

get_related_sections

Read-only

Find structurally and semantically related sections in documentation to navigate precisely and reduce token usage.

Instructions

v2.0+ related-section graph. Returns structural neighbors (siblings, children, parent, optional cousins) and semantic neighbors (top-N cosine over stored embeddings, score >= min_score). mode: structural | semantic | both.

Input Schema

NameRequiredDescriptionDefault
modeNoboth
repoYes
top_nNo
min_scoreNo
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`.
max_per_kindNo

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

TDQS

B3.2/5.0
Behavior3/5

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

readOnlyHint=true already declares the safe-read profile, so the bar is lower. The description adds value by disclosing the return composition (structural kinds, cosine-scored semantic neighbors, min_score threshold), but it omits pagination, ordering, and behavior of max_per_kind, and there is no output schema to fill the gap.

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?

Three dense sentences, front-loaded with the purpose before the returned-content detail, and the mode line reads as a compact quick-reference. No filler, though the terse jargon ('top-N cosine', 'optional cousins') assumes domain familiarity.

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

Completeness3/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 is the only source for return shape, and it only sketches the neighbor kinds at a high level. It also never covers the undocumented max_per_kind parameter or result limits, so an agent lacks full behavioral context for a 6-param tool.

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 only 17% (just section_id), so the description must compensate. It does explain mode, top_n (top-N cosine), and min_score (score >= min_score), which adds real meaning. But repo and max_per_kind are left entirely unexplained, leaving half the parameters undocumented anywhere.

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 a 'related-section graph' of structural neighbors (siblings, children, parent, cousins) and semantic neighbors. This is concrete and differentiated from generic reads. However, it does not distinguish itself from close siblings like section_neighbors or find_similar_sections, leaving overlap ambiguous.

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?

No when-to-use guidance is given: nothing tells the agent whether to prefer this over section_neighbors, get_section_context, or find_similar_sections, nor how to choose between structural/semantic/both modes in practice. The mode enum is listed but not framed as a decision rule.

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