Single tool 'query' has critically incomplete documentation and schema. The tool definition is visible in source (mcp_server_sparql/server.py, line 33-35), but exhibits severe deficiencies across naming, description clarity, parameter documentation, and output schema specification. The tool description is generic and embeds the endpoint URL dynamically rather than explaining how the tool serves the broader SPARQL query use case. Input schema defines only 'query_string' with a minimal description. No output schema is documented, the code returns results from SPARQLWrapper.query().convert(), but LLMs cannot predict the structure. Error handling returns unstructured error objects without guidance on recovery. No parameter constraints (regex, format, examples), no discussion of SPARQL syntax requirements, and no mention of timeout/pagination concerns for potentially large result sets.
Execute a SPARQL query against the endpoint {sparql_server.endpoint_url}. Args: query_string: A valid SPARQL query string Returns: The query results in JSON format
Output schema completely undocumented. Code returns results from SPARQLWrapper.query().convert(), but LLMs cannot infer structure (fields, nesting, pagination). LLMs need to know what fields to expect so they can plan downstream tool calls and extract the right data.'
Parameter description is trivial ('A valid SPARQL query string'). Does not explain SPARQL syntax requirements, query timeout, result size limits, or what endpoint is being queried. State WHAT the tool does, WHEN to use it, and any prerequisites.' Current description fails to guide LLM behavior.
Tool description embeds endpoint URL dynamically ('Execute a SPARQL query against the endpoint {sparql_server.endpoint_url}') rather than clearly stating the tool's purpose and when to use it. Violates tool-description pattern; description should be stable and LLM-optimized, not template-filled at registration time.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 37 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Input schema missing constraints. No enum for query type, no regex/format for SPARQL syntax validation, no length limits, no mention of required prefixes or SELECT/ASK/CONSTRUCT/DESCRIBE keywords. LLMs will pass invalid queries.
Error handling returns unstructured {'error': '...'} objects without recovery guidance. A raw error code or stack trace gives the agent nothing to act on.' Examples: 'EndPointNotFound' should guide to verify endpoint config; generic exceptions should suggest checking syntax or retrying.
No result size limits or pagination support documented. SPARQLWrapper can return hundreds or thousands of triples; without result capping or pagination, large result sets will exhaust LLM context window.
Tool naming 'query' is too generic. Specific names like 'send_email' or 'create_ticket' help LLMs distinguish tools when many are available.' Better: 'sparql_query', 'query_sparql_endpoint', or 'search_sparql_data'.
No documentation of SPARQL query format, supported syntax (SELECT/ASK/CONSTRUCT/DESCRIBE), or common failure modes (malformed queries, timeout, endpoint unavailability). LLM must guess.