Skip to main content
Glama

get_section_context

Retrieve a documentation section with its full hierarchy context: ancestor headings, target content, and child summaries — prevents thin sections without reading entire files.

Instructions

Retrieve a section with its full hierarchy context: ancestor headings (root → parent) for orientation, the target section's content, and immediate child summaries. Prevents 'section too thin' without falling back to whole-file reads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository identifier (owner/repo or just repo name)
section_idYesTarget section ID from get_toc, search_sections, etc.
max_tokensNoApproximate token budget for the target section's content (bytes/4 estimate). Ancestors and child summaries are always included.
include_childrenNoInclude immediate child section summaries (no content reads). Default true.
include_relatedNov1.20+ adaptive context: append structural + semantic neighbor summaries.
strip_boilerplateNov1.24+ — strip repeated cross-section fragments before returning the target section content.
Behavior3/5

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

No annotations provided, so description carries full burden. It discloses inclusion of ancestors, target content, and child summaries, and mentions behavior to prevent overly thin sections. However, it does not disclose behavior on missing sections, performance characteristics, or potential side effects. Adequate but not comprehensive.

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?

Two sentences, efficient and front-loaded. First sentence states core function clearly, second adds key behavior. No unnecessary words.

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 no output schema and 6 params, the description covers the main output components and key behaviors. However, it lacks details on return format and error handling, which would be expected for a retrieval tool without existing schema coverage. Still, strong for the complexity.

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%, baseline 3. Description adds value by clarifying that ancestors and child summaries are always included regardless of max_tokens, explains adaptive context for include_related, and boilerplate stripping for strip_boilerplate. These details go beyond the schema alone.

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?

Description clearly states it retrieves a section with full hierarchy (ancestors, target content, child summaries). It distinguishes itself from simpler section tools by preventing 'section too thin' without whole-file fallback, making its purpose precise and differentiated.

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

Usage Guidelines3/5

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

The description implies use when hierarchical context is needed and thin-section prevention is desired, but does not explicitly state when to use this tool versus alternatives like get_section or get_section_summaries. No explicit exclusions or alternative names are provided.

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