Skip to main content
Glama

read_section

Retrieve the body of a specific heading from a file, excluding the heading line. Returns section text, level, line number, size, and estimated tokens. Uses case-insensitive exact match.

Instructions

Return the body of ONE heading (the heading line itself is excluded) plus level, line, size_bytes, and est_tokens. Heading match is case-insensitive but exact-string after trim — fuzzy / partial matches do NOT resolve. Returns isError if the heading is absent. Read-only; no side effects, auth, or rate limits. Pair with read_file_outline when you are unsure which headings exist; for non-heading line ranges use read_file_lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesFile ID
headingYesHeading text to extract (case-insensitive)
Behavior5/5

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

Discloses all pertinent behavioral traits: read-only, no side effects, auth, or rate limits; exact-string match (case-insensitive); returns isError if heading absent. Since no annotations exist, description fully covers this.

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?

Three sentences, each adding unique value. Front-loaded with the core action, followed by constraints and usage guidance. No wasted words.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, description enumerates return fields (body, level, line, size_bytes, est_tokens) and mentions error case. With only two params, this is sufficiently complete for correct invocation.

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 covers both parameters with descriptions (100% coverage). The description adds that heading match is case-insensitive and exact, complementing the schema without redundancy.

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 'Return the body of ONE heading...' with a specific verb and resource, and distinguishes itself from siblings like read_file_lines and read_file_outline.

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

Usage Guidelines5/5

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

Explicitly instructs when to use this tool vs alternatives: 'Pair with read_file_outline when unsure which headings exist; for non-heading line ranges use read_file_lines.'

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/safiyu/ctxnest'

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