query_sparql
Run read-only SPARQL SELECT or ASK queries against a local Wikidata endpoint with automatic prefixes, row limits, and optional label hydration.
Instructions
Execute an arbitrary read-only SPARQL SELECT or ASK query against the local QLever Wikidata endpoint. Auto-declares standard prefixes (wd:, wdt:, rdfs:, xsd:) and enforces query limits.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "query_sparql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows to return (clamped between 1 and 500, default: 100). | |
| query | Yes | Read-only SPARQL query (SELECT or ASK). | |
| hydrate_labels | No | Whether to automatically resolve entity QID and property PID labels in results (default: true). |