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

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return per page (default 10, max 50). Must be a positive integer.
queryYesSearch query (e.g. "Python programming language"). 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

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe result ceiling that cut this page — the search window. Present only alongside truncated.
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.
effectiveQueryNoThe query sent to Wikipedia.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The annotations declare readOnlyHint=true and openWorldHint=true, so the safety profile is known, but the description adds behavioral context: it notes that results are ranked, snippets are HTML-stripped, and that a suggestion is returned when Wikipedia has a spelling correction. It also mentions the offset limit of 10,000, which is not in the schema description (the schema only gives a numerical bound). This adds value beyond the structured 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?

The description is concise and front-loaded, starting with the core purpose and then the key result characteristics. The first sentence covers purpose and result contents, and the follow-up sentences give usage guidance and pagination without waste. However, there is a slight repetition of offset information between the description and the schema description, which is minor, so I deduct one point for not being perfectly tight.

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?

The tool is a search operation with an output schema provided (not shown but exists), so the description doesn't need to enumerate return fields—but it does anyway in the first sentence. It covers pagination behavior, suggestions, and language edition support. It also names the relevant siblings for follow-up. For a search tool, this is complete: an agent knows what it does, when to use it, what parameters are needed, and how to handle results. Especially with annotations covering safety and openness, nothing is missing that would prevent a correct call.

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?

The schema description coverage is 100%, meaning all parameters (query, limit, offset, language) are described in the schema. However, the description adds meaningful context beyond the schema: it explains that 'limit' governs per-page size, that 'offset' can be derived from nextOffset in the response, and that an offset past the total count returns an empty array. It also clarifies language codes with examples. Since schema coverage is high, baseline is 3, but the description enriches semantics on four parameters, so a 4 is justified.

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 clearly states the tool performs full-text search over Wikipedia articles, with a specific verb ('Search') and resource ('Wikipedia articles'). It distinguishes itself from siblings like wikipedia_get_summary and wikipedia_get_article by mentioning that results include descriptions and QIDs, which helps in differentiating among same-named articles. This is well-beyond a mere restatement of the name.

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?

It explicitly says 'Best when the exact article title is unknown or when multiple articles on a topic are needed,' which clearly indicates when to use this tool. It also names the alternatives: 'Pass a result title to wikipedia_get_summary, wikipedia_get_article, or wikipedia_get_sections for follow-up reads,' and mentions pagination via offset. This provides both use cases and exclusions.

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.