Skip to main content
Glama

wikipedia-mcp-server

Get Wikipedia Article Languages

wikipedia_get_languages
Read-only

List the language editions available for a Wikipedia article. Returns language codes, article titles in each language, and full URLs. Useful for cross-language research and for discovering the correct article title in a target language before fetching it. A popular article exists in hundreds of editions, so pass editions to narrow the answer to the codes you care about — the codes with no article come back under missing, and total_languages still reports the full count. Redirect pages are followed automatically, and source_title reports the resolved article the links belong to. The language parameter specifies which edition to query from.

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_languages"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesArticle title in the source language edition. 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.
editionsNoEdition codes to keep, e.g. ["fr", "de", "gsw"]. Each is matched case-insensitively against both edition_code and language_code, so either spelling of a mismatch edition finds it ("gsw" matches the edition whose edition_code is "als"), and so does a legacy code naming it ("nb" for "no"). Omit to list every edition. Every code comes back in exactly one place, none of them a failure: its entry in languages; source_editions when it names the queried edition itself; unknown_editions when it names no Wikipedia edition; missing when the edition has no article for this title. With editions given, an article with no other editions returns an empty languages list instead of failing.
languageNoWikipedia language edition to query from (default "en"). Examples: "fr", "de", "ja".en

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when a requested code names no Wikipedia edition.
missingNoRequested codes with no article for this title, echoed as they were passed. Each names a real Wikipedia edition whenever the edition registry could check it; while the registry is unavailable an unchecked code lands here instead of unknown_editions. Present whenever editions was given — empty when no code fell here — and absent otherwise.
languagesNoAvailable language editions excluding the source language. Narrowed to the requested codes when editions was given, and empty when none of them matched.
source_titleNoResolved article title in the source language edition — the redirect target when the input was an alias.
source_editionsNoRequested codes naming the queried edition itself — the article read here, which is never listed among its own language editions — echoed as they were passed. Either spelling of a mismatch edition counts ("als" and "gsw" while querying "gsw"). Present only when non-empty.
source_languageNoThe language edition that was queried.
total_languagesNoTotal number of other language editions the article has. Always the unfiltered count, so it exceeds the length of languages whenever editions narrowed the list.
unknown_editionsNoRequested codes that name no Wikipedia edition, echoed as they were passed — a slip such as "jp" for "ja" or "cn" for "zh". Checked against the live edition registry only, so never reported while it is unavailable. Present only when non-empty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / editions / description
      Previous value: -"Edition codes to keep, e.g. [\"fr\", \"de\", \"gsw\"]. Each is matched case-insensitively against both edition_code and language_code, so either spelling of a mismatch edition finds it (\"gsw\" matches the edition whose edition_code is \"als\"). Omit to list every edition. A code with no article for this title is reported under missing rather than dropped, and is not a failure."New value: +"Edition codes to keep, e.g. [\"fr\", \"de\", \"gsw\"]. Each is matched case-insensitively against both edition_code and language_code, so either spelling of a mismatch edition finds it (\"gsw\" matches the edition whose edition_code is \"als\"), and so does a legacy code naming it (\"nb\" for \"no\"). Omit to list every edition. Every code comes back in exactly one place, none of them a failure: its entry in languages; source_editions when it names the queried edition itself; unknown_editions when it names no Wikipedia edition; missing when the edition has no article for this title. With editions given, an article with no other editions returns an empty languages list instead of failing."
    • changedInput schema / properties / title / description
      Previous value: -"Article title in the source language edition. A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name."New value: +"Article title in the source language edition. 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 / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: No Wikipedia article exists for the title in the specified language. `invalid_title`: The title contains characters MediaWiki cannot name a page with. `no_other_languages`: Article exists but has no other language editions. `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 title in the specified language. `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\". `no_other_languages`: Article exists but has no other language editions, and editions was not given. `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 / missing / description
      Previous value: -"Requested edition codes with no article for this title, echoed as they were passed. Present whenever editions was given — empty when every code matched — and absent otherwise."New value: +"Requested codes with no article for this title, echoed as they were passed. Each names a real Wikipedia edition whenever the edition registry could check it; while the registry is unavailable an unchecked code lands here instead of unknown_editions. Present whenever editions was given — empty when no code fell here — and absent otherwise."
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when a requested code names no Wikipedia edition.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / source_editions
      Added value: +{
      +  "description": "Requested codes naming the queried edition itself — the article read here, which is never listed among its own language editions — echoed as they were passed. Either spelling of a mismatch edition counts (\"als\" and \"gsw\" while querying \"gsw\"). Present only when non-empty.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / unknown_editions
      Added value: +{
      +  "description": "Requested codes that name no Wikipedia edition, echoed as they were passed — a slip such as \"jp\" for \"ja\" or \"cn\" for \"zh\". Checked against the live edition registry only, so never reported while it is unavailable. Present only when non-empty.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / editions
      Added value: +{
      +  "description": "Edition codes to keep, e.g. [\"fr\", \"de\", \"gsw\"]. Each is matched case-insensitively against both edition_code and language_code, so either spelling of a mismatch edition finds it (\"gsw\" matches the edition whose edition_code is \"als\"). Omit to list every edition. A code with no article for this title is reported under missing rather than dropped, and is not a failure.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / languages / description
      Previous value: -"Available language editions excluding the source language."New value: +"Available language editions excluding the source language. Narrowed to the requested codes when editions was given, and empty when none of them matched."
    • addedOutput schema / properties / missing
      Added value: +{
      +  "description": "Requested edition codes with no article for this title, echoed as they were passed. Present whenever editions was given — empty when every code matched — and absent otherwise.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / total_languages / description
      Previous value: -"Total number of other language editions available."New value: +"Total number of other language editions the article has. Always the unfiltered count, so it exceeds the length of languages whenever editions narrowed the list."
  3. Changed3 schema fields changed
    • changedInput schema / properties / title / description
      Previous value: -"Article title in the source language edition."New value: +"Article title in the source language edition. 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 title in the specified language. `no_other_languages`: Article exists but has no other language editions. `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 title in the specified language. `invalid_title`: The title contains characters MediaWiki cannot name a page with. `no_other_languages`: Article exists but has no other language editions. `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",
      -  "no_other_languages",
      -  "invalid_language"
      -]New value: +[
      +  "not_found",
      +  "invalid_title",
      +  "no_other_languages",
      +  "invalid_language"
      +]
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations by disclosing redirect following, that source_title reports the resolved article, that misses land under 'missing' rather than failing, that total_languages still reports the full count, and that a filtered query with no other editions returns an empty list instead of an error. These are exactly the non-obvious behaviors an agent needs to interpret results.

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?

Front-loaded with purpose and return values, then use cases, then parameter notes — a sensible order. It spends some words re-explaining the editions bucketing already documented in the schema, and the final sentence about 'language' is redundant, but overall it reads tightly.

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?

With an output schema present, the description needn't document the return shape, yet it still explains the notable edge cases (missing editions, total count, empty-list-on-filter, redirect resolution). Nothing an agent needs to invoke this correctly or interpret the response is absent.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3; the editions bucketing (languages/source_editions/unknown_editions/missing) is already spelled out in the schema and the description largely mirrors it. The one piece of added meaning is the rationale that popular articles exist in hundreds of editions, motivating use of 'editions' to narrow results; the closing sentence about 'language' merely restates 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?

Opens with a specific verb and resource: 'List the language editions available for a Wikipedia article,' and immediately names the payload (language codes, titles, URLs). This is clearly distinct from siblings such as get_article or get_sections, which return content rather than edition metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Gives concrete use cases ('cross-language research' and 'discovering the correct article title in a target language before fetching it'), which effectively routes the agent to follow up with an article-fetching tool. It lacks an explicit when-not statement or a named alternative for the case where the article is already known in the target language.

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.