Skip to main content
Glama
BaranziniLab

SPOKEAgent

Official
by BaranziniLab

Resolve a name/identifier to canonical SPOKE node(s)

resolve_entity
Read-onlyIdempotent

Map free-text names, synonyms, or identifiers to canonical SPOKE nodes before querying the graph, returning ranked candidates to handle case, apostrophes, and cross-vocabulary IDs.

Instructions

Map a free-text name, synonym, or identifier to the canonical SPOKE node(s).

Use this BEFORE query_spoke. It handles the things that make naive queries fail: case-sensitivity (exact {name:...} is case-sensitive), apostrophes, synonyms/brand names, and cross-vocabulary identifiers (DOID, Entrez, Ensembl, DrugBank, UMLS CUI, UBERON, GO). It uses SPOKE's range and full-text indexes, so it is fast and never scans the whole graph.

Returns ranked candidates: {label, name, identifier, matched_on, score}. Then query by the returned exact name or identifier via the parameters argument of query_spoke. If several candidates look plausible, state which one you picked and why.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoOptional node label to restrict to (e.g. 'Disease', 'Gene', 'Compound', 'Anatomy', 'SideEffect'). Strongly recommended when you know the entity type - it is faster and more accurate.
limitNoMax candidates to return.
queryYesFree-text name, synonym, or identifier to resolve (e.g. 'multiple sclerosis', "Parkinson's disease", 'Tylenol', 'EGFR', 'DOID:9352', 'ENSG00000130203', 'DB00619').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds genuinely non-obvious behavior: it relies on range and full-text indexes, never scans the whole graph, and handles case-sensitivity, apostrophes, synonyms/brand names, and cross-vocabulary identifiers — all traits an agent cannot infer from 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?

Front-loaded with the core purpose, then progressively adds the why, the failure modes it handles, the return shape, and the next step. Dense but every sentence carries weight; only the multi-vocabulary enumeration runs slightly long.

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?

No output schema exists, yet the description specifies the return shape ({label, name, identifier, matched_on, score}) and the downstream usage pattern. For a 3-parameter, single-required-param tool, an agent has everything needed to call it and act on results.

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%, so a 3 is the baseline, but the description adds real value beyond the schema by enumerating supported identifier vocabularies (DOID, Entrez, Ensembl, DrugBank, UMLS CUI, UBERON, GO) and by specifying how the returned `name`/`identifier` feed into query_spoke.

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 precise verb+resource: map free-text name/synonym/identifier to canonical SPOKE node(s). It clearly distinguishes itself from the sibling query_spoke by being the resolution step that precedes querying, rather than the query itself.

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?

Explicit sequencing instruction ('Use this BEFORE query_spoke') plus a follow-up instruction on what to do with results (query by returned exact name or identifier via query_spoke's `parameters` argument). It even covers the ambiguous case: when several candidates look plausible, state which was picked and why.

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