Skip to main content
Glama

wikipedia-mcp-server

Get Wikipedia Article

wikipedia_get_article
Read-only

Fetch article content as clean plain text. Without section_index: returns the full article with == Section == markers preserved for structure — or, when the article exceeds the size budget, a compact section outline (truncated: true) that points to wikipedia_get_sections plus a section_index read instead of the full text. With section_index (from wikipedia_get_sections): returns that section and every subsection nested under it, each heading above its own body. section_index 0 is the lead section, the text above the first heading, which is the full prose wikipedia_get_summary returns only a truncated fragment of. Section-targeted reads are faster and smaller when only part of the article is needed. Both paths keep superscripts and subscripts apart from the text beside them (10²³, H₂O), render formulas as their TeX, and render code samples as fenced blocks with their indentation intact. A section read also renders data tables as pipe-delimited rows (header row first) and infoboxes as "label: value" lines; a table too large to include leaves a "[table omitted: N rows]" marker in its place. The full-article path carries no data tables or infoboxes, so read the section for those. Tables used only for layout, such as multi-column lists, keep their content as ordinary text. Page furniture is omitted as well — maintenance banners, sister-project and library-resource boxes, portal bars, and spoken-article notices — while a hatnote naming a related article is kept. Every read returns the canonical article URL and the ID of the revision it was read from, for citation; a full read also returns that revision's timestamp. Redirect pages are followed automatically, and the citation fields name the target article.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesArticle title (e.g. "Python (programming language)"). A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name.
languageNoWikipedia language edition code (default "en"). Examples: "fr", "de", "ja".en
section_indexNoSection index from wikipedia_get_sections. 0 reads the lead section (Introduction) — the text above the first heading. Omit for the full article. Providing this returns the targeted section plus every subsection nested under it, as plain text.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoCanonical desktop URL of the article (e.g. "https://en.wikipedia.org/wiki/Eiffel_Tower"), for citing the page rather than composing a URL from the title.
errorNoPresent when the call failed. Absent on success.
titleNoResolved article title.
pageidNoWikipedia page ID. Absent on API parse responses that omit it.
contentNoPlain-text article content. Both full articles and section reads carry == Section == markers above the text each one heads, code samples as ``` fenced blocks, and superscripts and subscripts as Unicode characters (10²³, H₂O), or as ^x / ^(…) and _x / _(…) where a character has none. Section reads also carry data tables as | cell | cell | rows with a | --- | row under the header. When truncated is true, this instead carries a section outline (heading names and byte sizes) plus a pointer to the targeted-read path.
languageNoLanguage edition queried.
truncatedNoTrue when a full-article read exceeded the size budget and content is a section outline instead of the full text. Always false for section reads and for full articles within budget.
revision_idNoID of the revision the content was read from. "https://<edition>.wikipedia.org/w/index.php?oldid=<revision_id>" is a permanent link to exactly that version.
content_typeNoContent type: "full_article" or "section".
last_modifiedNoISO 8601 timestamp of that revision, for dating the content. Full-article reads only; a section read carries none.
section_titleNoSection title when section_index was provided — "Introduction" for the lead, which has no heading of its own. Absent for full-article reads.
original_lengthNoCharacter length of the full article text before outlining. Present only when truncated is true.
sections_suggestedNoTrue when content is an outline — call wikipedia_get_sections, then wikipedia_get_article with a section_index to read a specific section. Present only when truncated is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / content / description
      Previous value: -"Plain-text article content. Both full articles and section reads carry == Section == markers above the text each one heads. When truncated is true, this instead carries a section outline (heading names and byte sizes) plus a pointer to the targeted-read path."New value: +"Plain-text article content. Both full articles and section reads carry == Section == markers above the text each one heads, code samples as ``` fenced blocks, and superscripts and subscripts as Unicode characters (10²³, H₂O), or as ^x / ^(…) and _x / _(…) where a character has none. Section reads also carry data tables as | cell | cell | rows with a | --- | row under the header. When truncated is true, this instead carries a section outline (heading names and byte sizes) plus a pointer to the targeted-read path."
    • addedOutput schema / properties / last_modified
      Added value: +{
      +  "description": "ISO 8601 timestamp of that revision, for dating the content. Full-article reads only; a section read carries none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / revision_id
      Added value: +{
      +  "description": "ID of the revision the content was read from. \"https://<edition>.wikipedia.org/w/index.php?oldid=<revision_id>\" is a permanent link to exactly that version.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / url
      Added value: +{
      +  "description": "Canonical desktop URL of the article (e.g. \"https://en.wikipedia.org/wiki/Eiffel_Tower\"), for citing the page rather than composing a URL from the title.",
      +  "type": "string"
      +}
  2. Changed8 schema fields changed
    • changedInput schema / properties / section_index / description
      Previous value: -"Section index from wikipedia_get_sections. Omit for the full article. Providing this returns the targeted section plus every subsection nested under it, as plain text."New value: +"Section index from wikipedia_get_sections. 0 reads the lead section (Introduction) — the text above the first heading. Omit for the full article. Providing this returns the targeted section plus every subsection nested under it, as plain text."
    • addedInput schema / properties / section_index / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / section_index / minimum
      Added value: +0
    • changedInput schema / properties / section_index / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / title / description
      Previous value: -"Article title (e.g. \"Python (programming language)\")."New value: +"Article title (e.g. \"Python (programming language)\"). A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: No Wikipedia article exists for the given title. `invalid_section`: The section_index is out of range for this article. `invalid_language`: The language is not a valid BCP 47 code, or names a Wikipedia edition that does not exist. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `not_found`: No Wikipedia article exists for the given title. `invalid_title`: The title contains characters MediaWiki cannot name a page with. `invalid_section`: The section_index is out of range for this article. `invalid_language`: The language is not a valid BCP 47 code, or names a Wikipedia edition that does not exist. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "not_found",
      -  "invalid_section",
      -  "invalid_language"
      -]New value: +[
      +  "not_found",
      +  "invalid_title",
      +  "invalid_section",
      +  "invalid_language"
      +]
    • changedOutput schema / properties / section_title / description
      Previous value: -"Section title when section_index was provided. Absent for full-article reads."New value: +"Section title when section_index was provided — \"Introduction\" for the lead, which has no heading of its own. Absent for full-article reads."
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries the burden of behavioral disclosure. It thoroughly discloses truncation behavior (truncated: true, compact outline), formatting transformations (TeX formulas, fenced code blocks, pipe-delimited tables, infobox label/value lines), omitted page furniture, redirect following, and citation fields returned. This goes well beyond what annotations provide.

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?

The description is long but information-dense, with the primary behavior front-loaded and the two modes clearly separated. Every sentence adds a distinct behavioral fact; the length is justified by the tool's complexity. It could be slightly tightened, but it is well-structured and not repetitive.

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 tool's complexity, the rich output schema, and the annotations, the description is complete. It covers truncation, section semantics, formatting rules, omissions, redirects, and citation fields. An agent has everything needed to decide between full and section reads and to interpret the returned content.

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%, so the baseline is 3. The description adds meaningful semantics beyond the schema: it explains what section_index 0 means (lead section), what a section read returns (section plus nested subsections), and how the full-article path differs. It doesn't add much about title or language, but those are self-explanatory and fully covered by the schema.

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 opens with a specific verb and resource ('Fetch article content as clean plain text') and immediately distinguishes the two modes (full article vs section read). It also names the sibling tools it coordinates with (wikipedia_get_sections, wikipedia_get_summary), so an agent can tell it apart from the other Wikipedia tools without inspecting schemas.

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?

The description explicitly states when to use each path: omit section_index for the full article, provide it for a targeted section; it says section-targeted reads are faster and smaller when only part is needed; it points to wikipedia_get_sections for the index and notes that wikipedia_get_summary returns only a truncated fragment. This is clear routing guidance with alternatives named.

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.