sparql_validate
Validate SPARQL query syntax to catch errors before execution. Parses queries and reports validity, helping debug issues without running them.
Instructions
Validate SPARQL query syntax without executing it.
Parses the query and reports whether it is syntactically valid. Useful for debugging query errors before running them against an endpoint.
Args: params: Validation parameters containing the SPARQL query string.
Returns: Validation result with status and error details if invalid.
Examples: >>> # Valid query >>> sparql_validate(SparqlValidateInput(query="SELECT ?s WHERE { ?s ?p ?o }")) "Valid SPARQL query."
>>> # Invalid query
>>> sparql_validate(SparqlValidateInput(query="SELECT WHERE { }"))
"Invalid SPARQL query: ..."
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |