Skip to main content
Glama

analyze_headings

Read-onlyIdempotent

Analyze a page's H1-H6 heading hierarchy to return a nested tree, ordered list, tag counts, and hierarchy issues, with optional keyword checks in H1/H2 headings.

Instructions

Analyze the heading hierarchy (H1-H6) of a page. Returns a nested heading tree, flat list with ordering, tag counts, hierarchy issues, and optional keyword presence check across headings.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "analyze_headings"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe fully-qualified URL to analyze.
targetKeywordNoOptional keyword to check for presence in H1 and H2 headings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so safety is covered. The description adds real value by disclosing the return payload — nested tree, flat ordered list, tag counts, hierarchy issues, keyword presence — which matters given there is no output schema. It omits any mention of crawl cost, rate limits, or failure modes for unreachable URLs.

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 sentences, purpose front-loaded before the return-value enumeration, with no filler or redundant restatement of the tool name. Every clause conveys distinct information.

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?

For a simple two-parameter read-only tool with no output schema, the description covers what it does and what comes back, which is the key gap to fill. It could additionally note that the URL must be fully-qualified and reachable, but nothing essential for invocation is missing.

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%, with both url and targetKeyword fully documented in the schema itself. The description restates the keyword check ('across headings') without adding precision beyond the schema's 'H1 and H2 headings', so it neither extends nor misleads. Baseline 3 applies.

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?

The description states a specific verb and resource — analyzing the H1-H6 heading hierarchy of a page — which is clearly distinct from sibling tools like analyze_images or analyze_internal_links. It stops short of explicitly naming a sibling to route against, so it is clear but not maximally differentiating.

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?

Usage is implied by the resource focus (check heading structure on a single page), but there is no explicit when-to-use versus when-not-to-use guidance and no named alternative such as analyze_page for broader audits. Adequate but leaves the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.