Skip to main content
Glama

List graphs on a SPARQL endpoint

get_graph_list
Read-only

Lists named graphs available on a SPARQL endpoint for a specified database, ranking matching graph URIs first to help identify the correct graph for queries.

Instructions

Get a list of named graphs on a SPARQL endpoint. database is required. Endpoints are the same registry run_sparql uses: RDF Portal (https://rdfportal.org/) for most databases, plus the external endpoints run_sparql's description names.

RETURNS a CSV-formatted list of named graphs (database-name matches first). On missing endpoint selection it returns a string beginning with 'Error:' — check for that prefix before use.

Graph URIs containing the database substring (case-insensitive) are ranked first, always — useful when the endpoint hosts multiple databases (e.g. SIB hosts UniProt + Rhea + Bgee + OMA). Virtuoso/OpenLink internal graphs are filtered out unless include_system=True.

The endpoint URL is resolved with the same priority used by run_sparql: endpoint_url > endpoint_name > database. If only database is given it must be in the registry; otherwise pass endpoint_url (or endpoint_name if its parent endpoint is registered) to bypass that check, and the required database value then serves only as the ranking hint.

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": {
      "database": "<database>"
    },
    "name": "get_graph_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseYesRDF database name (e.g. 'uniprot', 'chembl'). Required. When the name is in the registry it resolves the endpoint URL; in any case the value is used as a case-insensitive substring to rank matching graph URIs first. For an unregistered database, also pass `endpoint_url` or `endpoint_name` (which take priority); `database` is then just the ranking hint.
endpoint_urlNoDirect SPARQL endpoint URL. Use when neither the database nor its parent endpoint name is in the registry. Must be a registered endpoint or a public http(s) one; internal addresses are refused.
endpoint_nameNoShort endpoint name (e.g. 'primary', 'sib', 'ebi'). Use when the database is not yet registered but its parent endpoint is.
include_systemNoIf True, include Virtuoso/OpenLink internal graphs (virtrdf, ldp, activitystreams, etc.). Default False — these are never useful for queries.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.34.1
    • changedInput schema / properties / endpoint_url / description
      Previous value: -"Direct SPARQL endpoint URL. Use when neither the database nor its parent endpoint name is in the registry."New value: +"Direct SPARQL endpoint URL. Use when neither the database nor its parent endpoint name is in the registry. Must be a registered endpoint or a public http(s) one; internal addresses are refused."
  2. Changed5 schema fields changedv2.0.0
    • removedInput schema / properties / database / default
      Removed value: -""
    • changedInput schema / properties / database / description
      Previous value: -"RDF database name (e.g. 'uniprot', 'chembl'). When the name is in the registry it resolves the endpoint URL; in any case the value is used as a case-insensitive substring to rank matching graph URIs first. Optional if `endpoint_url` or `endpoint_name` is provided."New value: +"RDF database name (e.g. 'uniprot', 'chembl'). Required. When the name is in the registry it resolves the endpoint URL; in any case the value is used as a case-insensitive substring to rank matching graph URIs first. For an unregistered database, also pass `endpoint_url` or `endpoint_name` (which take priority); `database` is then just the ranking hint."
    • removedInput schema / properties / db
      Removed value: -{
      -  "default": "",
      -  "type": "string"
      -}
    • removedInput schema / properties / dbname
      Removed value: -{
      -  "default": "",
      -  "type": "string"
      -}
    • addedInput schema / required
      Added value: +[
      +  "database"
      +]
  3. 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 and openWorldHint, but the description discloses behavior beyond that: CSV return format, the 'Error:' string prefix on missing endpoint selection, case-insensitive ranking of matching graph URIs, and that system graphs are filtered unless include_system=True. It also notes internal addresses are refused, which is real operational context an agent cannot infer.

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?

Well front-loaded: purpose first, then return shape and error signal, then ranking, then resolution priority. Some redundancy exists between the description and the already-complete schema text on endpoint priority, costing a little tightness but not comprehension.

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, yet the description still adds a useful return-shape summary (CSV, ranking, system-graph filtering) and the error-prefix check. Between the exhaustive schema, annotations, and this description, nothing an agent needs to invoke the tool correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents every parameter including the ranking hint and priority order. The description restates the same resolution priority and ranking semantics, which is clarifying but adds little meaning beyond the structured fields; baseline 3 applies.

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?

States a specific verb and resource ('Get a list of named graphs on a SPARQL endpoint') and immediately situates it relative to siblings by naming the shared endpoint registry that run_sparql uses. An agent can distinguish this from get_sparql_endpoints (which lists endpoints, not graphs) without opening a schema.

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?

Gives explicit selection rules: 'endpoint_url > endpoint_name > database', when the database must be in the registry, and that passing endpoint_url or endpoint_name bypasses that check. It also explains the fallback role of `database` as a ranking hint in that case, which is precisely the decision an agent needs to make.

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