sparql
Pack: dbpedia · Endpoint: https://gateway.pipeworx.io/dbpedia/mcp
Execute a SPARQL query against the DBpedia public endpoint.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | SPARQL query text |
format | string | no | json (default) | xml | csv | tsv |
Example call
Arguments
{
"query": "SELECT ?resource ?label WHERE { ?resource a dbo:Person ; rdfs:label ?label . FILTER (LANG(?label) = 'en') } LIMIT 10"
}
curl
curl -X POST https://gateway.pipeworx.io/dbpedia/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"sparql","arguments":{"query":"SELECT ?resource ?label WHERE { ?resource a dbo:Person ; rdfs:label ?label . FILTER (LANG(?label) = '\''en'\'') } LIMIT 10"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('sparql', {
"query": "SELECT ?resource ?label WHERE { ?resource a dbo:Person ; rdfs:label ?label . FILTER (LANG(?label) = 'en') } LIMIT 10"
});
More examples
{
"query": "SELECT ?city ?population WHERE { ?city a dbo:City ; dbo:populationTotal ?population . } ORDER BY DESC(?population) LIMIT 5",
"format": "csv"
}
Response shape
Full JSON Schema
{
"oneOf": [
{
"type": "object",
"description": "SPARQL JSON results format",
"properties": {
"head": {
"type": "object",
"description": "Query result header with variable names"
},
"results": {
"type": "object",
"description": "Query result bindings"
}
}
},
{
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": [
"xml",
"csv",
"tsv"
],
"description": "Response format (non-JSON)"
},
"body": {
"type": "string",
"description": "Query results as raw text in specified format"
}
},
"required": [
"format",
"body"
]
}
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"dbpedia": {
"url": "https://gateway.pipeworx.io/dbpedia/mcp"
}
}
}
See Getting Started for client-specific install steps.