You're viewing a demo portfolio

Join the waitlist
PRSM

wikidata_sparql_query

Active

Tool of io.github.cyanheads/wikidata-mcp-server

declared in 0.1.14

Execute a SPARQL SELECT query against the Wikidata Query Service. Full graph power: multi-hop traversals, aggregations, subqueries, OPTIONAL, FILTER, UNION, BIND. Standard Wikidata prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:) are auto-injected. The wikibase:label SERVICE is also auto-injected when language is set and the query includes ?<var>Label variables — so you can use ?itemLabel without writing the boilerplate. Hard server timeout is 60s; use LIMIT to keep queries fast. Bindings use the SPARQL 1.1 JSON format: each value is { type, value, "xml:lang"? }. Use wikidata_get_labels to humanize QID results from this tool.

Parameters schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "SPARQL SELECT query. Must be a SELECT query (not CONSTRUCT/DESCRIBE/ASK). Standard prefixes (wd:, wdt:, p:, ps:, pq:, wikibase:, bd:) are injected automatically. Example: SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. } LIMIT 10"
    },
    "timeout": {
      "type": "integer",
      "default": 30,
      "maximum": 55,
      "minimum": 1,
      "description": "Client-side timeout in seconds (1–55). Capped at 55s — the Wikidata server hard limit is 60s."
    },
    "language": {
      "type": "string",
      "default": "en",
      "description": "Language for the wikibase:label SERVICE (e.g., \"en\", \"de\"). Controls the language of ?<var>Label variables. Set to \"\" to suppress label SERVICE injection."
    }
  }
}

What this tool wraps· 1 endpoint

min confidence0.700.50

Parent server

io.github.cyanheads/wikidata-mcp-server

https://github.com/cyanheads/wikidata-mcp-server

1/7 registries
View full server →