Skip to main content
Glama
berntpopp
by berntpopp

Run SPARQL Query

run_sparql_query
Read-onlyIdempotent

Execute custom SPARQL 1.1 queries against the UniProt endpoint to retrieve protein data not covered by predefined tools, with support for multiple result formats.

Instructions

Execute an arbitrary SPARQL 1.1 query against the UniProt endpoint (SELECT / ASK / CONSTRUCT / DESCRIBE, including SERVICE federation to Rhea, OMA, Bgee, etc.). SELECT results come back as columns+rows JSON; ASK as a boolean; CONSTRUCT/DESCRIBE as raw RDF in the chosen format. A LIMIT is auto-injected into unbounded SELECTs (see _meta/truncated). This is the escape hatch for anything the typed tools do not cover -- seed queries from search_example_queries. Use uniprot://prefixes for the standard PREFIX block. Unbounded or federated queries can take 10-60 s; bound lookups (anchored on an accession/gene/taxon) return in <2 s. Signature: run_sparql_query(query, result_format=, limit=, timeout_seconds=).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesA complete SPARQL 1.1 query string.
result_formatNoResult serialisation. Use json for SELECT/ASK.json
limitNoLIMIT to inject when a SELECT lacks one (capped at 10000).
timeout_secondsNoPer-call timeout override in seconds.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successNo
_metaNo
error_codeNo
messageNo
retryableNo
recovery_actionNo
fieldNo
allowed_valuesNo
hintNo
query_typeNo
columnsNo
row_countNo
rowsNo
booleanNo
content_typeNo
dataNo
byte_lengthNo
truncatedNo
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, and openWorldHint, covering safety and idempotency. The description adds valuable behavioral details beyond these: auto-injection of LIMIT into unbounded SELECTs with a _meta/truncated flag, federation endpoints, and performance characteristics. No contradictions with annotations.

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

Conciseness4/5

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

The description is reasonably concise given the complexity of the tool. It front-loads the main purpose, then layers details about results, behavioral traits, usage guidance, performance, and signature. Every sentence adds value, though the density could be slightly improved with more structured formatting. No wasted words.

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 complexity (SPARQL endpoint, multiple query types, federation) and the existence of an output schema, the description covers all essential aspects: query types, result formats, auto-limit, escape hatch role, prefix usage, performance tiers, and parameter signature. It does not need to repeat output schema details. The description is comprehensive for effective agent use.

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

Parameters4/5

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

Schema coverage is 100% with detailed parameter descriptions. The description adds additional context: it explains the auto-limit injection and the _meta/truncated indicator, and provides a signature line showing parameter names. This enriches understanding beyond what the schema alone offers, justifying a score above the baseline of 3.

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 tool executes arbitrary SPARQL 1.1 queries against the UniProt endpoint, lists supported query forms (SELECT/ASK/CONSTRUCT/DESCRIBE), and explicitly distinguishes it from sibling tools by labeling it as 'the escape hatch for anything the typed tools do not cover.' This provides a precise verb+resource description with clear differentiation.

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: it positions the tool as an escape hatch, directs users to seed queries from search_example_queries, mentions using uniprot://prefixes for standard prefixes, and even gives performance expectations (unbounded/federated queries 10-60s, bound lookups <2s). This effectively tells the agent when and how to use the tool versus alternatives.

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/berntpopp/uniprot-link'

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