Skip to main content
Glama

get_section_descendants

Read-only

Retrieve all descendant sections of a target section in document order with optional depth cap, enabling structured navigation of documentation by section 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
max_depthNoOptional cap on traversal depth. None = full subtree. 1 = immediate children only.
section_idYesTarget section. Its descendants are returned; target itself is not included.
Behavior4/5

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

Annotations already indicate readOnlyHint=true, so the description needs to add behavioral specifics. It does so by clarifying the traversal algorithm (BFS), ordering (document order), depth offset, and the fact that only handles are returned ('Handles only — no content'). No contradiction with annotations.

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 two sentences with no fluff. It front-loads the version requirement and key operation, then adds details in a logical order. Every sentence adds unique value.

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?

Given the absence of an output schema, the description hints at the return structure (descendants in order, handles only). While it doesn't explicitly state the exact format (e.g., array of section IDs), it provides enough context for an agent to understand the output nature. The tool's complexity (BFS, depth handling) is well-covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description must add extra value. It reiterates max_depth behavior with a concrete example and notes that the section_id target itself is not included (not in schema). This provides clarity beyond the schema descriptions.

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 specifies the verb 'return', the resource 'every descendant of a section', and the method 'BFS over parent_id' with ordering 'in document order with depth offset'. It also pairs with a sibling tool (get_section_path for ancestors), clearly distinguishing its purpose.

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 explicitly pairs with get_section_path (ancestors), providing a complementary use case. The optional max_depth parameter is explained with a concrete example (max_depth=1 returns immediate children). However, it does not state explicit when-not-to-use scenarios or alternatives beyond the one sibling.

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