Execute SPARQL Query
query_sparqlExecute raw SPARQL queries against the Schema.gov.it catalog for ad-hoc exploration and analysis of Italian government data.
Instructions
Execute a RAW SPARQL query against schema.gov.it.
Args:
query: The SPARQL query to execute (prefixes are auto-injected)
source: "schema" | "local" | "hybrid" (default: "schema")
file_path / content / upload_id: local context when source="local"
Returns:
Compressed JSON result (tabular for >5 rows, object array otherwise)
Examples:
SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10SELECT ?class (COUNT(?s) AS ?count) WHERE { ?s a ?class } GROUP BY ?class
When to use this vs X:
vs
query_local_ontology: use this for the default remote catalogschema.gov.it; usequery_local_ontologyfor a file/store loaded locally or viaupload_idvs
query_external_endpoint: use this for the built-inschema.gov.itendpoint; usequery_external_endpointonly for another HTTPS SPARQL endpointvs specialized tools: use this only when no dedicated tool already covers the task
Do not use this if:
you need a concept profile → use
inspect_conceptyou need property semantics → use
get_property_detailsyou need to search by keyword without a known URI → use
search_conceptsyou need to browse a vocabulary or dataset → use the dedicated vocabulary/dataset tools
Important: raw hybrid SPARQL is not supported yet. Use source="hybrid" only on specialized concept/property tools, not here.
Note: Use this for ad-hoc exploration. Prefer specialized tools for common operations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SPARQL query to execute | |
| format | No | RDF content type for inline content | |
| source | No | Execution context: "schema" for schema.gov.it, "local" for a file/uploaded store. "hybrid" is reserved and not supported for raw SPARQL. | schema |
| content | No | Inline RDF content when source='local' | |
| file_path | No | Absolute path to a local ontology file when source='local' | |
| upload_id | No | Uploaded ontology store ID when source='local' |