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, render code samples as fenced blocks with their indentation intact, and render list items as "- " or numbered "N." lines indented two spaces per nesting level, the indent capped at 16 levels. 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 (table T)]" marker. Pass table_index: T with section_index to read only that table in complete row pages whose table text fits within 40,000 UTF-8 bytes on both surfaces. Follow next_cursor as cursor with the same inputs to continue at the pinned revision; caption/header/delimiter appear once. An indivisible oversized row or first-page caption/header is returned alone with oversized_row: true. The full-article path carries no data tables or infoboxes, so read the section for those. Phylogenetic clade trees render as fenced, indented branches, with unnamed forks preserved; unparseable trees leave "[table omitted: unparseable clade]". Clade trees have no table_index. In a section read, tables used only for layout, such as multi-column lists, keep their content as ordinary text; the full-article path drops them, so read the section for those lists. 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "title": "<title>"
    },
    "name": "wikipedia_get_article"
  }
}

Input 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. Special: and Media: titles, and interwiki links such as "wikt:cat", name no page.
cursorNoOpaque next_cursor from the previous table page. Keep title, language, section_index and table_index unchanged. Empty means the first page.
languageNoWikipedia language edition code (default "en"). Examples: "fr", "de", "ja".en
table_indexNo1-based outer wikitable or infobox ordinal in the section. Requires section_index. Returns only that table in complete row pages; nested cell tables have no ordinal.
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

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.
noticeNoDisambiguation-page guidance, redirect guidance, or disclosure that an optional lookup (TOC verification, the disambiguation check) was unavailable.
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, list items as "- " or "N." lines indented two spaces per nesting level, 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.
page_typeNoPresent only on a disambiguation page — one that lists the articles a title can refer to — and then "disambiguation", the value wikipedia_get_summary reports for it.
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.
row_offsetNoZero-based first row position in this page.
table_rowsNoTotal rendered rows, including the first header row.
next_cursorNoPass unchanged as cursor with the same table request to read the pinned revision. Absent on the final page.
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.
table_countNoAvailable outer data tables in the pinned section.
table_indexNoSelected table ordinal, for table reads only.
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.
oversized_rowNoTrue when an indivisible row or first-page caption/header exceeds the 40,000-byte table-text budget and is returned alone.
rows_returnedNoNumber of complete rows returned in this page.
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.
redirected_fromNoOriginal alias followed to the resolved article.
table_continuedNoTrue for a headerless continuation page.
redirect_sectionNoRedirect target fragment, or its normalized heading when verified. Explicit section_index still controls the read.
sections_suggestedNoTrue when content is an outline — use its verified section_index values with wikipedia_get_article, or call wikipedia_get_sections for unindexed entries. Present only when truncated is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / title / description
      Previous 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."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. Special: and Media: titles, and interwiki links such as \"wikt:cat\", name no page."
    • 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, 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."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, list items as \"- \" or \"N.\" lines indented two spaces per nesting level, 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."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_table`: A table selector is unavailable or section_index/table_index is missing for a table read. `invalid_cursor`: A table cursor is malformed, mismatched, or points past the pinned table. `revision_unavailable`: The table revision the cursor is pinned to no longer exists, is hidden, or cannot be read or verified. `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."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_table`: A table selector is unavailable or section_index/table_index is missing for a table read. `invalid_cursor`: A table cursor is malformed, mismatched, or points past the pinned table. `revision_unavailable`: The table revision the cursor is pinned to no longer exists, is hidden, or cannot be read or verified. `not_found`: No Wikipedia article exists for the given title. `invalid_title`: The title can name no page: it contains characters MediaWiki forbids in a page name, is a Special: or Media: title in any edition's spelling, or is an interwiki link such as \"wikt:cat\". `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 / notice / description
      Previous value: -"Redirect guidance or disclosure that optional TOC verification was unavailable."New value: +"Disambiguation-page guidance, redirect guidance, or disclosure that an optional lookup (TOC verification, the disambiguation check) was unavailable."
    • addedOutput schema / properties / page_type
      Added value: +{
      +  "const": "disambiguation",
      +  "description": "Present only on a disambiguation page — one that lists the articles a title can refer to — and then \"disambiguation\", the value wikipedia_get_summary reports for it.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_table`: A table selector is unavailable or section_index/table_index is missing for a table read. `invalid_cursor`: A table cursor is malformed, mismatched, or points past the pinned table. `revision_unavailable`: The pinned table revision cannot be read or verified. `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."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_table`: A table selector is unavailable or section_index/table_index is missing for a table read. `invalid_cursor`: A table cursor is malformed, mismatched, or points past the pinned table. `revision_unavailable`: The table revision the cursor is pinned to no longer exists, is hidden, or cannot be read or verified. `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."
  3. Changed12 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque next_cursor from the previous table page. Keep title, language, section_index and table_index unchanged. Empty means the first page.",
      +  "type": "string"
      +}
    • addedInput schema / properties / table_index
      Added value: +{
      +  "description": "1-based outer wikitable or infobox ordinal in the section. Requires section_index. Returns only that table in complete row pages; nested cell tables have no ordinal.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • 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_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."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_table`: A table selector is unavailable or section_index/table_index is missing for a table read. `invalid_cursor`: A table cursor is malformed, mismatched, or points past the pinned table. `revision_unavailable`: The pinned table revision cannot be read or verified. `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_title",
      -  "invalid_section",
      -  "invalid_language"
      -]New value: +[
      +  "invalid_table",
      +  "invalid_cursor",
      +  "revision_unavailable",
      +  "not_found",
      +  "invalid_title",
      +  "invalid_section",
      +  "invalid_language"
      +]
    • addedOutput schema / properties / next_cursor
      Added value: +{
      +  "description": "Pass unchanged as cursor with the same table request to read the pinned revision. Absent on the final page.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / oversized_row
      Added value: +{
      +  "description": "True when an indivisible row or first-page caption/header exceeds the 40,000-byte table-text budget and is returned alone.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / row_offset
      Added value: +{
      +  "description": "Zero-based first row position in this page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / rows_returned
      Added value: +{
      +  "description": "Number of complete rows returned in this page.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / table_continued
      Added value: +{
      +  "description": "True for a headerless continuation page.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / table_count
      Added value: +{
      +  "description": "Available outer data tables in the pinned section.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / table_index
      Added value: +{
      +  "description": "Selected table ordinal, for table reads only.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / table_rows
      Added value: +{
      +  "description": "Total rendered rows, including the first header row.",
      +  "type": "number"
      +}
  4. Changed4 schema fields changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Redirect guidance or disclosure that optional TOC verification was unavailable.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / redirect_section
      Added value: +{
      +  "description": "Redirect target fragment, or its normalized heading when verified. Explicit section_index still controls the read.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / redirected_from
      Added value: +{
      +  "description": "Original alias followed to the resolved article.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / sections_suggested / description
      Previous value: -"True 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."New value: +"True when content is an outline — use its verified section_index values with wikipedia_get_article, or call wikipedia_get_sections for unindexed entries. Present only when truncated is true."
  5. 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"
      +}
  6. 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."
  7. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint and openWorldHint, but the description goes far beyond: size-budget truncation with a 'truncated: true' outline, omitted furniture and dropped tables on the full-article path, table page cursors and oversized_row behavior, TeX/fenced-code/list rendering, clade-tree edge cases, and citation fields for the pinned revision. This is exceptional behavioral disclosure.

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

Conciseness3/5

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

Front-loaded correctly (purpose, then path selection, then rendering details, then citation), but it becomes a dense multi-clause wall of text with many low-frequency edge cases. Much of the rendering and citation detail is return-value behavior already implied by the output schema, so not every sentence earns its place in the description.

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?

For a 5-parameter read tool with an output schema and annotations, the description covers everything an agent needs: path selection, truncation semantics, pagination, rendering, and citation. Nothing material is missing.

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 nonetheless adds real meaning: section_index provenance from wikipedia_get_sections, section_index 0 as the lead section, that table_index requires section_index and continues via cursor with unchanged inputs, and title fragment/# handling. Some of this restates the schema, keeping it just shy of 5.

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?

States a specific verb and resource ('Fetch article content as clean plain text') and clearly delimits its scope against wikipedia_get_sections and wikipedia_get_summary. An agent can choose this tool on purpose 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?

Explicitly contrasts full-article reads vs section_index reads, names wikipedia_get_sections and wikipedia_get_summary as the sources/alternatives, and tells the agent which path is appropriate ('Section-targeted reads are faster and smaller when only part of the article is needed'). Strong when-to-use guidance.

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.