mediawiki_get_sections
Retrieve a MediaWiki page's section headings and table of contents, or fetch a specific section's wikitext or HTML. Use it to list sections or get one section without loading the full page.
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
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Page title to get sections from | |
| format | No | Output format for section content: 'wikitext' (default) or 'html' | |
| section | No | Specific section number to retrieve content for (0 = intro, 1+ = sections). Omit to list all sections. | |
| rationale | No | Optional one-sentence explanation of why you are calling this tool. Used for audit trails when present. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| format | No | ||
| message | No | ||
| page_id | Yes | ||
| sections | No | ||
| section_title | No | ||
| section_content | No |