Extract Headings
extract_headingsExtract the ATX heading outline (# … ######) as {level, text} entries (keyless, offline).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | The Markdown text. |
extract_headingsExtract the ATX heading outline (# … ######) as {level, text} entries (keyless, offline).
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | The Markdown text. |
Changes observed during successful MCP inspections.
Input schema / examplesAdded value: +[
+ {
+ "markdown": "# Introduction\n## Getting Started\n### Installation\n## Usage\n# Conclusion"
+ },
+ {
+ "markdown": "# Main Title\n## First Section\n### Subsection\n## Second Section"
+ }
+]Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, and the description adds extra context by noting the output is 'keyless' and 'offline'. It also specifies the exact output format as {level, text} entries, contributing behavioral transparency beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that every word contributes to understanding the tool's purpose and output. No filler or redundant information is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple with one parameter and no output schema, but the description covers the core behavior, input, and output format. The presence of annotations and the explicit mention of 'keyless, offline' make it adequate for an agent to use correctly, though a bit more detail on edge cases (e.g., malformed markdown) could push it higher.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%: the single 'markdown' parameter is described accurately as 'The Markdown text.' The tool description does not add further parameter-level detail, so it meets the baseline for full schema coverage without extra insight.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Extract' with a clear resource ('ATX heading outline') and defines the output structure as {level, text} entries. It distinguishes itself from siblings like markdown_to_text and extract_links by focusing solely on ATX headings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (when you need ATX heading outlines) but provides no explicit alternatives or when-not-to-use guidance. The purpose is clear enough for the agent to infer usage, but there are no stated exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.