Skip to main content
Glama

Extract headings and code examples

extract_page_structure
Read-onlyIdempotent

Read visible headings, indentation-preserved code examples and optional section prose on an approved public HTTPS page. Returns its source URL and untrusted source content.

Input Schema

NameRequiredDescriptionDefault
urlYesApproved public HTTPS URL.
sectionNoReturn only an exact heading and its directly associated examples. Match a heading title ignoring case or an exact returned #fragment.
maxHeadingsNoMaximum number of headings to return.
maxCodeBlocksNoMaximum number of examples to return. Set to 0 for headings only.
maxCodeCharactersNoMaximum characters per code example.
maxSectionCharactersNoMaximum section prose characters. Requires an exact section heading or #fragment.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description still contributes real context beyond them: the result includes the source URL, content is 'untrusted' (a prompt-injection / trust warning), and code examples are indentation-preserved. It does not mention rate limits, approval failures, or how much of a page is bounded by the caps.

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 tight sentences: the first front-loads what is read, the second states the return shape including the trust caveat. No filler or redundancy.

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

Completeness3/5

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

For a six-parameter read tool with no output schema, the description covers what comes back at a high level (source URL, untrusted content) and the annotations cover safety. However, it says nothing about behavior when the URL is not approved, what happens if section matches nothing, or whether results are truncated at the caps.

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 description coverage is 100%, so the schema already explains url, section, and each limit parameter. The description adds only marginal framing by noting section prose is optional and that headings/examples are the primary output, without clarifying matching or fragment behavior beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: read visible headings, indentation-preserved code examples and optional section prose from a public HTTPS page, plus what is returned. It is clear what the tool does, but it never distinguishes itself from siblings like fetch_page or find_in_page, which also read page content.

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

Usage Guidelines2/5

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

There is no when-to-use / when-not-to-use guidance and no pointer to alternatives such as fetch_page for raw content or find_in_page for text search. The only implicit scoping is 'approved public HTTPS page' and 'optional section prose', which an agent must infer.

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.

Resources