Skip to main content
Glama

Run SPARQL against AOP-Wiki RDF

run_sparql
Read-only

Executes read-only SPARQL 1.1 queries against the AOP-Wiki endpoint, returns JSON rows, enforces safe limits, and provides repair advice for query errors.

Instructions

Run a read-only SPARQL 1.1 query against https://aopwiki.rdf.bigcat-bioinformatics.org/sparql and return the rows as JSON. Writes, Virtuoso extensions (DEFINE, bif:, sql:), SERVICE and unanchored full scans are rejected; a missing LIMIT becomes LIMIT 100 and the ceiling is 1000 rows. Known prefixes are added when you forget them. Errors, timeouts and empty results come back with advice on how to repair the query: read it and try again rather than giving up.

Orientation: All content is in GRAPH http://aopwiki.org/. Entities are identifiers.org IRIs: AOPs https://identifiers.org/aop/N, KEs https://identifiers.org/aop.events/N, KERs https://identifiers.org/aop.relationships/N, stressors https://identifiers.org/aop.stressor/N. AOP structure: aopo:has_molecular_initiating_event, aopo:has_key_event, aopo:has_adverse_outcome, aopo:has_key_event_relationship; KERs use aopo:has_upstream_key_event / aopo:has_downstream_key_event. Several metadata predicates are opaque ontology IRIs (ncit:C25664 = level of biological organisation, ncit:C54571 = stressor, ncbitaxon:131567 = taxonomic applicability); the schema card lists them all.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "run_sparql"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and destructiveHint=false, but the description goes much further: it names the rejected query classes, states that a missing LIMIT becomes LIMIT 100 with a 1000-row ceiling, explains that missing prefixes are auto-added, and says errors return repair advice. That is exactly the behavioral context annotations cannot carry.

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?

Purpose and constraints are front-loaded in the first paragraph, with domain orientation set off under an explicit 'Orientation:' label. The orientation paragraph is dense but each predicate mapping earns its place by reducing query-repair rounds; only the closing pointer to the schema card is slightly redundant.

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

Completeness5/5

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

An output schema exists, so return values need no explanation, and the description covers the remaining burdens for a generic query runner: permitted syntax, rejected constructs, implicit LIMIT and result ceiling, prefix handling, error-recovery loop, and the graph/predicate vocabulary needed to write a first query.

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 0% for the single 'query' parameter, so the description must compensate, and it does: SPARQL 1.1 grammar, endpoint target, prefix auto-injection, LIMIT defaulting, and the 1000-row cap all describe what the query string may and may not contain. It stops short of spelling out the accepted result formats or how truncation is signalled.

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 first sentence states a specific verb, resource, and endpoint: 'Run a read-only SPARQL 1.1 query against https://... and return the rows as JSON.' That is clearly distinct from siblings like resolve_entity, get_schema_card, and search_examples, so an agent can route without opening the schema.

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 gives strong operational constraints (no writes, no Virtuoso extensions, no SERVICE, no unanchored scans) and explicit retry advice: 'read it and try again rather than giving up.' It also points at the schema card for opaque predicates. What's missing is an explicit statement of when to prefer this tool over resolve_entity or get_schema_card.

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