Skip to main content
Glama

run_sparql

Run SPARQL queries on biological RDF databases such as UniProt, Rhea, or PubMed, or on cross-database endpoints like SIB, EBI, or NCBI to retrieve structured 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, massbank) 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
dbNo
queryNo
dbnameNo
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, massbank. Do NOT pass an endpoint group name here (e.g. 'ebi', 'sib') — those go in endpoint_name instead.
endpoint_urlNoDirect SPARQL endpoint URL. Use this for explicit control over the endpoint.
sparql_queryNoThe SPARQL query to execute. Alias: `query`.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses deterministic failure for invalid inputs, which is useful, but omits details on rate limits, result size, or required authentication. The behavioral disclosure is adequate but not comprehensive.

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 densely packed with essential information in two sentences, front-loading the purpose and valid options. It could be slightly more structured for readability, but every sentence earns its place.

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 parameter count (7), moderate schema coverage, and lack of annotations, the description covers the critical decision logic (single vs cross-database) and error behavior. The presence of an output schema reduces the need to explain return values. Minor gaps (e.g., result format) don't hinder usability.

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%, so the description compensates significantly by explaining the purpose and valid values for 'database' and 'endpoint_name', clarifying alias relationships (query/sparql_query), and noting that invalid values fail immediately. This adds meaning beyond the schema.

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 runs a SPARQL query on an RDF database, lists allowed databases and endpoint names, and differentiates single-database from cross-database usage. This specific verb-resource pairing and scope distinguishes it from sibling tools.

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', instructs not to retry on invalid values, and lists valid options. It lacks explicit 'when not to use' or alternatives, but the context is clear enough for selection.

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