Skip to main content
Glama

Wikipedia (Unofficial)

Get Article Sections

get_article_sections
Read-onlyIdempotent

Section outline of a Wikipedia article by title, the table-of-contents. Returns all headings + hierarchy (H2, H3, etc.) without the prose. Use when the article is long (history, science topics, biographies) and you want to navigate to a specific section vs reading the entire summary. Chain with get_article_summary for the lead text. Cheap, structural-only.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "title": "World War II"
    },
    "name": "get_article_sections"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesWikipedia article title (e.g., "World War II")

Output Schema

NameRequiredDescriptionDefault
titleYesArticle title
pageidYesWikipedia page ID
sectionsYesArray of section headings with hierarchy

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "pageid": {
      +      "description": "Wikipedia page ID",
      +      "type": "number"
      +    },
      +    "sections": {
      +      "description": "Array of section headings with hierarchy",
      +      "items": {
      +        "properties": {
      +          "anchor": {
      +            "description": "URL anchor/fragment for section",
      +            "type": "string"
      +          },
      +          "level": {
      +            "description": "Heading level (1-6)",
      +            "type": "number"
      +          },
      +          "number": {
      +            "description": "Section numbering (e.g., '1.2.3')",
      +            "type": "string"
      +          },
      +          "title": {
      +            "description": "Section heading text (HTML-stripped)",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "title",
      +          "level",
      +          "number",
      +          "anchor"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "title": {
      +      "description": "Article title",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "title",
      +    "pageid",
      +    "sections"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "title": "World War II"
      +  },
      +  {
      +    "title": "Photosynthesis"
      +  }
      +]
  3. First observed

TDQS

A4.4/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 safety is covered. The description adds behavior beyond that: headings and hierarchy only, no prose, and a cost signal ('cheap, structural-only'), which helps an agent pick this over heavier reads. It doesn't discuss failures for missing/disambiguation titles, keeping it at 4.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with what is returned, then usage, then chaining, then a cost note — a sensible information order with almost no filler. The opening phrase 'section outline ... the table-of-contents' is mildly redundant, and the final telegraphic fragment is terse but still informative.

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

Completeness5/5

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

With one fully described parameter, rich annotations, and an existing output schema, the remaining burden on the description is small. It covers purpose, selection guidance, chaining, and cost, so nothing an agent needs in order to call this correctly 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?

The single title parameter is fully documented in the schema (100% coverage) with examples, so the schema does the heavy lifting. The description only restates 'by title' and adds no format guidance such as handling redirects, disambiguation pages, or exact-title matching. Baseline 3 is appropriate.

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?

Names the resource (Wikipedia article section outline / table-of-contents) and specifies exactly what is returned: all headings plus hierarchy without prose. It also contrasts itself with the sibling get_article_summary, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit use condition (long articles such as history, science, or biographies where you want to navigate to a specific section rather than read the whole summary) and names the alternative plus the chaining pattern with get_article_summary for lead text. Both when-to-use and how-to-combine are stated.

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.