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. Data tables are omitted from both paths, so a section whose body is entirely a data table returns its heading and little else; tables used only for layout, such as multi-column lists, keep their content. 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. Redirect pages are followed automatically.

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
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. 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.
content_typeNoContent type: "full_article" or "section".
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. 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."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only provide readOnlyHint and openWorldHint. The description goes far beyond by disclosing behavior under size budget (truncated: true with a compact outline), omission of data tables and page furniture, retention of hatnotes, and automatic redirect following. This describes what the agent will actually receive and what gets discarded, providing rich behavioral context.

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 long but every sentence adds unique value. It is front-loaded with the core action and then systematically covers modes, truncation, table handling, furniture, and redirects without redundancy. The structure logically flows from general behavior to edge cases, and the length is justified by the tool's complexity.

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 (multiple modes, truncation, omission behaviors) and the availability of an output schema, the description covers all critical aspects: when truncation occurs, what the fallback is, what is omitted, what is kept, and how redirects are handled. It also ties into sibling tools, leaving no gap in an agent's ability to decide when and how to call it.

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 description coverage is 100%, so the schema already documents all parameters. The description adds extra nuance, especially for section_index (0 meaning lead, nested subsections behavior) and title character restrictions. While the description does not spell out the language parameter format beyond schema, it meaningfully enriches the two most behaviorally complex parameters, so it earns above the baseline of 3.

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 states a specific verb ('Fetch') and resource ('article content') as clean plain text, and clearly distinguishes between the full-article mode and the section-targeted mode. It also references sibling tools (wikipedia_get_sections, wikipedia_get_summary) with explicit contrasts, so an agent can tell them apart immediately.

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 gives explicit when-to-use guidance: it explains when section_index should be used ('faster and smaller when only part of the article is needed'), the truncation fallback to sections plus a section_index read, and clarifies that the summary tool returns only a truncated fragment of the lead, implying this tool is needed for full prose. No alternative tool is left ambiguous.

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.