Skip to main content
Glama

Extract Headings

extract_headings
Read-onlyIdempotent

Extract the ATX heading outline (# … ######) as {level, text} entries (keyless, offline).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
markdownYesThe Markdown text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "markdown": "# Introduction\n## Getting Started\n### Installation\n## Usage\n# Conclusion"
      +  },
      +  {
      +    "markdown": "# Main Title\n## First Section\n### Subsection\n## Second Section"
      +  }
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.