Skip to main content
Glama

get_section_descendants

Traverse a section's descendants in document order with optional max depth, returning only section IDs. Pairs with ancestor retrieval to map documentation hierarchy.

Instructions

v1.43+ — return every descendant of a section (BFS over parent_id) in document order with depth offset. Pairs with get_section_path (ancestors). Optional max_depth caps the walk; max_depth=1 returns immediate children only. Handles only — no content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository identifier
section_idYesTarget section. Its descendants are returned; target itself is not included.
max_depthNoOptional cap on traversal depth. None = full subtree. 1 = immediate children only.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the BFS algorithm, document order, depth offset behavior, version requirement (v1.43+), and that it returns only handles (IDs) with no content. It lacks details on rate limits, errors, or side effects, but for a read-only query tool, the disclosure is substantial.

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?

The description is highly concise: three sentences covering the main functionality, the pairing sibling, the optional parameter, and the return type. It is front-loaded with the essential action and efficiently packs key details without redundancy.

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?

The description covers the core algorithm (BFS), ordering, optional depth, pairing, and return type (handles only). Without an output schema, it sufficiently explains what is returned. Minor omissions like error handling or more explicit return format are not critical given the tool's complexity, but completeness is high.

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 baseline is 3. The description adds marginal value by clarifying that section_id returns descendants excluding itself and that max_depth=1 yields immediate children, but these are already implied by schema descriptions. No additional nuance is provided for the repo parameter.

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?

The description clearly states the specific verb 'return' and resource 'every descendant of a section', with details on the BFS algorithm, document order, and depth offset. It distinguishes itself from siblings like get_section_path (ancestors) and get_section (single section) by explicitly pairing with the former and focusing on descendants.

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?

The description provides clear context by suggesting pairing with get_section_path for ancestors and explaining the optional max_depth parameter. However, it does not explicitly state when not to use this tool or mention alternative tools for similar tasks among the siblings, leaving some ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jgravelle/jdocmunch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server