Skip to main content
Glama

mediawiki_get_sections

Read-onlyIdempotent

Retrieve the table of contents or specific section content from a MediaWiki page. Use to navigate page structure or get targeted content.

Instructions

Get page section structure (TOC) or specific section content.

USE WHEN: User asks "what sections does X have", "show the table of contents", "get the Installation section".

NOT FOR: Full page content (use mediawiki_get_page).

PARAMETERS:

  • title: Page name (required)

  • section: Section index to retrieve content (optional; omit for TOC only)

  • format: "wikitext" (default) or "html" (for section content)

RETURNS: Section headings with indices, or specific section content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rationaleNoOptional one-sentence explanation of why you are calling this tool. Used for audit trails when present.
titleYesPage title to get sections from
sectionNoSpecific section number to retrieve content for (0 = intro, 1+ = sections). Omit to list all sections.
formatNoOutput format for section content: 'wikitext' (default) or 'html'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
page_idYes
sectionsNo
section_contentNo
section_titleNo
formatNo
messageNo
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint. The description adds behavioral context: omitting section returns TOC, section=0 is intro, format options (wikitext/html), and the nature of the return value. This supplements the annotations well.

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 divided into clear sections (USE WHEN, NOT FOR, PARAMETERS, RETURNS). Every sentence adds value, no redundancy. It's concise yet comprehensive.

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?

Given the presence of an output schema, the description does not need to detail return values. It covers all necessary aspects: purpose, usage scenarios, parameter behavior, and differentiation from siblings. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds significant usage context: explains conditional behavior (omit section for TOC, section=0 for intro, default format). This goes beyond the schema descriptions and helps the agent understand parameter interactions.

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 clearly states that the tool retrieves page section structure (TOC) or specific section content. It uses specific verbs like 'get' and 'retrieve' and distinguishes from the sibling tool 'mediawiki_get_page' which handles full 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 Guidelines5/5

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

Explicit use cases are provided: 'User asks what sections does X have, show table of contents, get the Installation section'. It also explicitly states what NOT to use it for and directs to the appropriate alternative, which is excellent guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olgasafonova/mediawiki-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server