Skip to main content
Glama

Scrape Wikipedia

scrape_wikipedia

Retrieve Wikipedia article text by title or search term. Choose full text, paragraphs, or section headings as structured output.

Instructions

Fetch a Wikipedia article by title or search term and return its text content.

Makes a live network request to Wikipedia, resolving the query to the best-matching article and extracting its body. The shape of the returned text depends on mode: "full" returns the entire article as one string; "paragraphs" returns the article split into a list of paragraph strings; "headers" returns a list of the article's section heading strings (its table of contents). If no article matches the query, an empty result is returned (empty string for "full", empty list for "paragraphs" or "headers").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoString, one of "full", "paragraphs", or "headers". Selects the return shape as described above. Example: "paragraphs". No default (required).full
queryYesString. Article title or search term. Example: "Model Context Protocol". No default (required).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
countNo
errorsNo
scraperNo
source_urlsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / mode / description
      Previous value: -"\"full\", \"paragraphs\", or \"headers\"."New value: +"String, one of \"full\", \"paragraphs\", or \"headers\". Selects the return shape as described above. Example: \"paragraphs\". No default (required)."
    • changedInput schema / properties / query / description
      Previous value: -"Article title or search term, e.g. \"Model Context Protocol\"."New value: +"String. Article title or search term. Example: \"Model Context Protocol\". No default (required)."
  2. Changed18 schema fields changedv1.3.3
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / mode / description
      Added value: +"\"full\", \"paragraphs\", or \"headers\"."
    • removedInput schema / properties / mode / title
      Removed value: -"Mode"
    • addedInput schema / properties / query / description
      Added value: +"Article title or search term, e.g. \"Model Context Protocol\"."
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / title
      Removed value: -"scrape_wikipediaArguments"
    • removedOutput schema / $defs
      Removed value: -{
      -  "ToolError": {
      -    "description": "A non-fatal problem encountered while scraping.",
      -    "properties": {
      -      "message": {
      -        "title": "Message",
      -        "type": "string"
      -      },
      -      "url": {
      -        "title": "Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "url",
      -      "message"
      -    ],
      -    "title": "ToolError",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / count / title
      Removed value: -"Count"
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / errors / items / $ref
      Removed value: -"#/$defs/ToolError"
    • addedOutput schema / properties / errors / items / description
      Added value: +"A non-fatal problem encountered while scraping."
    • addedOutput schema / properties / errors / items / properties
      Added value: +{
      +  "message": {
      +    "type": "string"
      +  },
      +  "url": {
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / errors / items / required
      Added value: +[
      +  "url",
      +  "message"
      +]
    • addedOutput schema / properties / errors / items / type
      Added value: +"object"
    • removedOutput schema / properties / errors / title
      Removed value: -"Errors"
    • removedOutput schema / properties / scraper / title
      Removed value: -"Scraper"
    • removedOutput schema / properties / source_urls / title
      Removed value: -"Source Urls"
    • removedOutput schema / title
      Removed value: -"ScrapeToolResult"
  3. Addedv1.2.0
  4. Removed
  5. First observedv1.1.6

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses that a live network request is made, that the query is resolved to the best-matching article, and that empty results are returned when no match exists. It could add error-handling or rate-limit context, but the core behavioral traits are transparent.

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 well-structured and front-loaded: purpose first, then network behavior, then mode semantics, then edge-case behavior. Every sentence adds necessary information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists and the parameter schema covers both parameters, the description is largely complete. It explains the mode-dependent return shapes and empty-result behavior. It could mention network failure or default-mode behavior, but overall it gives an agent enough to invoke the tool correctly.

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 coverage is 100%, so the baseline is 3. The description adds useful meaning by explaining each mode's return shape and the no-match behavior. However, it does not clarify the default for `mode`, and the schema itself is internally inconsistent (default 'full' vs 'No default (required)'), so the description misses a chance to resolve that ambiguity.

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 opens with a specific verb and resource: 'Fetch a Wikipedia article by title or search term and return its text content.' This clearly distinguishes it from sibling scrapers like scrape_url or scrape_stock, and the mode details further specify what 'text content' means.

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?

The description makes the intended use clear: retrieving Wikipedia article content by title or search term. It does not explicitly name alternatives or state when not to use it, but the Wikipedia-specific scope is unambiguous enough that an agent can select it correctly among the listed siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.