Skip to main content
Glama

run_sparql

Run SPARQL queries on single biological databases (e.g., UniProt, ChEMBL) or cross-database endpoints to retrieve integrated RDF data.

Instructions

Run a SPARQL query on an RDF database. Specify database (valid values: uniprot, rhea, pubchem, pdb, chembl, chebi, reactome, ensembl, amrportal, mesh, go, taxonomy, mondo, nando, bacdive, mediadive, clinvar, pubmed, pubtator, ncbigene, medgen, ddbj, glycosmos, supercon, bgee, oma, brenda, hgnc, jpostdb) for single-database queries, or endpoint_name (valid values: sib, pubchem, pdb, ebi, primary, ncbi, ddbj, glycosmos, nims) / endpoint_url for cross-database queries on shared endpoints. Invalid database/endpoint_name values fail immediately with a deterministic error — do not retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sparql_queryNoThe SPARQL query to execute. Alias: `query`.
databaseNoName of a single RDF database. Must be exactly one of: uniprot, rhea, pubchem, pdb, chembl, chebi, reactome, ensembl, amrportal, mesh, go, taxonomy, mondo, nando, bacdive, mediadive, clinvar, pubmed, pubtator, ncbigene, medgen, ddbj, glycosmos, supercon, bgee, oma, brenda, hgnc, jpostdb. Do NOT pass an endpoint group name here (e.g. 'ebi', 'sib') — those go in endpoint_name instead.
endpoint_nameNoEndpoint name for cross-database queries. One of: sib, pubchem, pdb, ebi, primary, ncbi, ddbj, glycosmos, nims. Use this when querying multiple databases on the same endpoint.
endpoint_urlNoDirect SPARQL endpoint URL. Use this for explicit control over the endpoint.
dbnameNo
dbNo
queryNo

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. It discloses that invalid database/endpoint_name values cause deterministic errors and should not be retried. However, it omits other behaviors like authentication, rate limits, or potential query timeouts.

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 concise at two sentences, front-loading the core action. The second sentence is dense with valid values and usage rules, which could be more readable as a list, but overall it is efficient without unnecessary text.

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 complexity of 7 parameters, the description adequately covers the main usage patterns. It explains error behavior, which is critical for an agent. Since an output schema exists, return value documentation is not necessary. However, it could mention result size limits or pagination for completeness.

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 57%, and the description adds value by explaining the two usage modes, listing valid values for 'database' and 'endpoint_name', and noting that 'query' is an alias for 'sparql_query'. It does not, however, clarify the purpose of 'dbname', 'db', or the exact relationship between aliases.

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 'Run a SPARQL query on an RDF database' and distinguishes between single-database and cross-database queries. It names specific valid values for database and endpoint_name, differentiating it from sibling tools that target specific entities or databases.

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

Usage Guidelines4/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 'database' vs 'endpoint_name'/'endpoint_url', and warns against retrying on invalid values. However, it does not explicitly mention when alternative sibling tools (e.g., search_*) should be preferred over this generic query tool.

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/dbcls/togomcp'

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