Wikidata MCP Server

execute_sparql

Run SPARQL queries on Wikidata to retrieve structured data with predefined prefixes. Returns results in JSON format, ideal for extracting specific information from linked datasets.

Instructions

Execute a SPARQL query on Wikidata. You may assume the following prefixes: PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX p: <http://www.wikidata.org/prop/> PREFIX ps: <http://www.wikidata.org/prop/statement/> Args: sparql_query (str): The SPARQL query to execute. Returns: str: The JSON-formatted result of the SPARQL query execution. If there are no results, an empty JSON object will be returned.

Input Schema

NameRequiredDescriptionDefault
sparql_queryYes

Input Schema (JSON Schema)

{ "properties": { "sparql_query": { "title": "Sparql Query", "type": "string" } }, "required": [ "sparql_query" ], "title": "execute_sparqlArguments", "type": "object" }

You must be authenticated.

Other Tools from Wikidata MCP Server

Related Tools

ID: hm1c5dex3y