Skip to main content
Glama

get_section

Retrieve a specific section from a Markdown file using a dot-separated heading path. Optionally limit how many child heading levels are included.

Instructions

Return the heading line(s) and body of the section at path.

path is a dot-separated heading path, e.g. "My README.Installation.Prerequisites". Matching is case-insensitive. Returns the raw Markdown text of the section.

depth controls how many levels of child sections are included:

  • None (default): return the section and all descendants

  • 0: return the heading and its own body only (no child sections)

  • 1: heading + own body + immediate children

  • 2: heading + own body + children + grandchildren etc.

Raises an error string if the path does not exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
depthNo
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so the description carries full burden. It discloses case-insensitive matching, depth behavior, error handling (raises error string), and return format (raw Markdown). However, it doesn't state that the operation is read-only (though inferred) or mention any restrictions.

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 concise, well-structured, and front-loaded with the core purpose. Every sentence adds value, with no extraneous information. The depth parameter explanation is clear and compact.

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 presence of an output schema, the description does not need to detail return values. It adequately covers path matching, depth semantics, and error behavior. However, the lack of explanation for 'file_path' is a minor gap, and the sibling context from the list helps differentiate.

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 description coverage is 0%, but the description thoroughly explains the 'path' format and 'depth' options with examples. It does not elaborate on 'file_path', which is required, leaving some ambiguity. Overall, it adds significant value beyond the schema.

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 the tool returns heading line(s) and body of a section at a given path. The verb 'return' and resource 'section' are specific, and it distinguishes from sibling tools like add_section, delete_section, etc.

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 explains how to use the tool (specify path, optionally depth) and implies it's for retrieving section content. It does not explicitly state when not to use it or mention alternatives, but the sibling context indirectly provides differentiation.

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/afriemann/md-mcp'

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