Skip to main content
Glama

wikipedia-mcp-server

Search Wikipedia

wikipedia_search_articles
Read-only

Search Wikipedia articles by full-text query. Returns ranked results with plain-text titles, short descriptions, Wikidata QIDs, snippets (HTML stripped), page IDs, and word counts — the description is usually enough to tell same-named articles apart without a summary call per result. When Wikipedia has a spelling correction for the query, it is returned as suggestion. Best when the exact article title is unknown or when multiple articles on a topic are needed. Pass a result title to wikipedia_get_summary, wikipedia_get_article, or wikipedia_get_sections for follow-up reads. Use offset to page beyond the first result page. Supports all Wikipedia language editions.

Input Schema

NameRequiredDescriptionDefault
sortNoResult order (default relevance). Keep the same query and sort when paging with offset.relevance
limitNoMaximum number of results to return per page (default 10). Positive integers above 50 are clamped with a notice.
queryYesSearch query. CirrusSearch operators include incategory:"1648 treaties", morelike:Peace of Westphalia, intitle:Python, hastemplate:Infobox, and insource:Python; support depends on the selected installation. Must not be empty.
offsetNoResult offset for pagination (default 0). Pass the nextOffset from a previous response to fetch the next page; limit still governs the per-page size. An offset past the total match count returns an empty result array, not an error. Wikipedia serves no result past 10,000, so an offset at or beyond that fails — narrow the query instead.
languageNoWikipedia language edition code (default "en"). Examples: "fr", "de", "ja".en

Output Schema

NameRequiredDescriptionDefault
capNoThe result ceiling that cut this page — the search window. Present only alongside truncated.
sortNoEffective search order sent to Wikipedia.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of results returned on this page.
noticeNoGuidance when no results matched (naming the spelling suggestion when there is one), when the end of results was reached while paging, when the page was cut at the search window, or when descriptions and Wikidata QIDs could not be loaded for the page. Absent on ordinary result pages.
offsetNoThe result offset applied to this page (echo of the input).
resultsNoRanked search results.
languageNoLanguage edition queried.
truncatedNoTrue when this page was cut at Wikipedia's 10,000-result search window and totalCount matches remain that no offset can reach. Absent on every other page, including a genuine last page.
nextOffsetNoOffset to request the next page. Present only when more results remain — pass it back as offset to continue; absent at the end of results.
suggestionNoWikipedia's spelling correction for the query, when it has one (e.g. "einstein" for "einstien"). Re-run with it as query to search the corrected spelling. Absent when the query has no likely misspelling.
totalCountNoTotal matching results in Wikipedia.
appliedLimitNoApplied page size, present only when clamped.
effectiveQueryNoThe query sent to Wikipedia.
requestedLimitNoRequested page size, present only when clamped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `empty_query`: The query is an empty string, which Wikipedia reads as a missing parameter. `offset_too_large`: The offset is at or past the search window, which has no continuation. `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_query`: CirrusSearch refuses a regex because its syntax is invalid or it is too complex. `empty_query`: The query is an empty string, which Wikipedia reads as a missing parameter. `offset_too_large`: The offset is at or past the search window, which has no continuation. `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: -[
      -  "empty_query",
      -  "offset_too_large",
      -  "invalid_language"
      -]New value: +[
      +  "invalid_query",
      +  "empty_query",
      +  "offset_too_large",
      +  "invalid_language"
      +]
  2. Changed8 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results to return per page (default 10, max 50). Must be a positive integer."New value: +"Maximum number of results to return per page (default 10). Positive integers above 50 are clamped with a notice."
    • changedInput schema / properties / limit / maximum
      Previous value: -50New value: +9007199254740991
    • changedInput schema / properties / query / description
      Previous value: -"Search query (e.g. \"Python programming language\"). Must not be empty."New value: +"Search query. CirrusSearch operators include incategory:\"1648 treaties\", morelike:Peace of Westphalia, intitle:Python, hastemplate:Infobox, and insource:Python; support depends on the selected installation. Must not be empty."
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": "relevance",
      +  "description": "Result order (default relevance). Keep the same query and sort when paging with offset.",
      +  "enum": [
      +    "relevance",
      +    "last_edit_desc",
      +    "create_timestamp_desc",
      +    "incoming_links_desc",
      +    "title_natural_asc"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "results",
      -      "language",
      -      "effectiveQuery",
      -      "totalCount",
      -      "offset",
      -      "shown"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "results",
      +      "language",
      +      "sort",
      +      "effectiveQuery",
      +      "totalCount",
      +      "offset",
      +      "shown"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / appliedLimit
      Added value: +{
      +  "description": "Applied page size, present only when clamped.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / requestedLimit
      Added value: +{
      +  "description": "Requested page size, present only when clamped.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / sort
      Added value: +{
      +  "description": "Effective search order sent to Wikipedia.",
      +  "enum": [
      +    "relevance",
      +    "last_edit_desc",
      +    "create_timestamp_desc",
      +    "incoming_links_desc",
      +    "title_natural_asc"
      +  ],
      +  "type": "string"
      +}
  3. Changed4 schema fields changed
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no results matched, when the end of results was reached while paging, or when the page was cut at the search window. Absent on ordinary result pages."New value: +"Guidance when no results matched (naming the spelling suggestion when there is one), when the end of results was reached while paging, when the page was cut at the search window, or when descriptions and Wikidata QIDs could not be loaded for the page. Absent on ordinary result pages."
    • addedOutput schema / properties / results / items / properties / description
      Added value: +{
      +  "description": "Short description of the article subject (e.g. \"General-purpose programming language\"). Absent when the article has none, or when descriptions could not be loaded for the page (see notice).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / wikibase_item
      Added value: +{
      +  "description": "Wikidata QID (e.g. \"Q28865\") for chaining into wikidata-mcp-server. Absent when the article has no Wikidata item, or when it could not be loaded for the page (see notice).",
      +  "type": "string"
      +}
    • addedOutput schema / properties / suggestion
      Added value: +{
      +  "description": "Wikipedia's spelling correction for the query, when it has one (e.g. \"einstein\" for \"einstien\"). Re-run with it as query to search the corrected spelling. Absent when the query has no likely misspelling.",
      +  "type": "string"
      +}
  4. Changed8 schema fields changed
    • changedInput schema / properties / limit / maximum
      Previous value: -9007199254740991New value: +50
    • changedInput schema / properties / offset / description
      Previous value: -"Result offset for pagination (default 0). Pass the nextOffset from a previous response to fetch the next page; limit still governs the per-page size. An offset past the total match count returns an empty result array, not an error."New value: +"Result offset for pagination (default 0). Pass the nextOffset from a previous response to fetch the next page; limit still governs the per-page size. An offset past the total match count returns an empty result array, not an error. Wikipedia serves no result past 10,000, so an offset at or beyond that fails — narrow the query instead."
    • changedInput schema / properties / query / description
      Previous value: -"Search query (e.g. \"Python programming language\")."New value: +"Search query (e.g. \"Python programming language\"). Must not be empty."
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The result ceiling that cut this page — the search window. Present only alongside truncated.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `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: `empty_query`: The query is an empty string, which Wikipedia reads as a missing parameter. `offset_too_large`: The offset is at or past the search window, which has no continuation. `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: -[
      -  "invalid_language"
      -]New value: +[
      +  "empty_query",
      +  "offset_too_large",
      +  "invalid_language"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no results matched — e.g. try different keywords, or that the end of results was reached when paging. Absent on successful result pages."New value: +"Guidance when no results matched, when the end of results was reached while paging, or when the page was cut at the search window. Absent on ordinary result pages."
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when this page was cut at Wikipedia's 10,000-result search window and totalCount matches remain that no offset can reach. Absent on every other page, including a genuine last page.",
      +  "type": "boolean"
      +}
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, yet the description still adds real behavioral context: result fields, HTML-stripped snippets, the spelling-correction suggestion field, and the 10,000-result ceiling where an outdated offset fails rather than erroring on an empty page. These are operational constraints an agent cannot get from the annotations.

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 the verb and scope, then layered with return shape, guidance, and pagination in a sensible order. It runs slightly long, and the paging note is partially duplicated by the offset schema description, but no sentence is filler.

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?

An output schema exists, so return values need not be explained, yet the description qualifies them usefully (plain-text titles, stripped snippets, QIDs). Combined with the offset ceiling and clamping behavior, an agent has everything needed to call this correctly on the first attempt.

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 enum values and limits are already documented. The description adds marginal value by explaining the offset paging workflow and by noting that all Wikipedia language editions are supported, which frames the language parameter's reach beyond the schema's three examples.

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 ("Search Wikipedia articles by full-text query") and immediately frames the scope as article search across language editions. It is clearly separable from siblings like wikipedia_get_summary and wikipedia_get_article, which it names as follow-up tools rather than competitors.

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 gives the use case: "Best when the exact article title is unknown or when multiple articles on a topic are needed," and routes the agent onward by saying to pass a result title to wikipedia_get_summary, wikipedia_get_article, or wikipedia_get_sections. That is a named alternative plus the condition that selects it.

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.