Skip to main content
Glama

Run SPARQL Query

sparql_query

Execute SPARQL SELECT or CONSTRUCT queries to search and retrieve data from knowledge graphs, returning results as JSON for data analysis and integration.

Instructions

Executes a read-only SPARQL SELECT or CONSTRUCT query against the user's graphs. Returns query results as JSON. Use this for searching and retrieving data from graphs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sparqlYes
result_formatNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully communicates that this is a read-only operation (important safety context) and specifies the query types supported (SELECT/CONSTRUCT). However, it doesn't mention potential limitations like query timeout, result size limits, authentication requirements, or error handling. The description adds useful context but leaves significant behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with three tightly focused sentences: the first states the core functionality, the second specifies the return format, and the third provides usage guidance. Every sentence earns its place with no wasted words, and the most important information (read-only query execution) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (SPARQL queries can be complex), no annotations, and an output schema that presumably documents the return structure, the description covers the essential aspects: purpose, read-only nature, supported query types, and basic usage. However, the complete lack of parameter documentation (0% schema coverage with no compensation in the description) prevents a perfect score, as users need to understand what constitutes valid SPARQL syntax.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for both parameters, the description provides no additional semantic information about the 'sparql' parameter (what constitutes a valid SPARQL query) or 'result_format' parameter (what formats are supported beyond the default 'json'). The description mentions JSON output but doesn't clarify if this relates to the result_format parameter or is fixed behavior. The description fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Executes'), resource ('SPARQL SELECT or CONSTRUCT query against the user's graphs'), and distinguishes it from sibling tools by specifying it's for read-only queries (unlike sparql_update which presumably handles updates). It explicitly mentions the return format ('Returns query results as JSON') and primary use case ('searching and retrieving data from graphs').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('for searching and retrieving data from graphs') and implicitly when not to use it (since it's 'read-only' and only handles SELECT/CONSTRUCT queries, suggesting sparql_update should be used for modifications). It clearly differentiates from the sparql_update sibling tool without needing to name it directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sophia-labs/mnemosyne-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server