Skip to main content
Glama
BaranziniLab

SPOKEAgent

Official
by BaranziniLab

Find shortest path(s) between two SPOKE nodes

find_path
Read-onlyIdempotent

Find paths connecting two entities in the SPOKE biomedical knowledge graph, returning ordered nodes and relationship types to reveal how they link.

Instructions

Find the shortest connecting path(s) between two entities in SPOKE - the right tool for "how are X and Y connected / what links X to Y / shortest path" and subgraph-bridge questions. Both endpoints are resolved first (case / apostrophe / id safe), then a bounded bidirectional allShortestPaths search runs (anchored, so it is fast and cannot scan the graph). Returns each path as an ordered list of nodes and the relationship types between them - so you can read off the intermediate nodes and mechanism in ONE call instead of probing many queries.

If no path is found within max_hops, that is reported (try a larger max_hops, or the entities are only distantly connected). Returns {source, target, max_hops, paths:[{hops, nodes:[...], rels:[...]}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSource entity name or identifier (e.g. 'APOE', 'aspirin', 'DOID:9256').
targetYesTarget entity name or identifier.
max_hopsNoMaximum path length to search (1-5; clamped).
max_pathsNoMaximum number of shortest paths to return.
source_labelNoOptional label for the source (e.g. 'Gene', 'Compound', 'Disease').
target_labelNoOptional label for the target.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description still adds substantial behavioral context: endpoint resolution is case/apostrophe/id safe, the search is a bounded bidirectional allShortestPaths that is anchored and 'cannot scan the graph', and it discloses the no-path-within-max_hops outcome plus remediation. This is rich disclosure well beyond the 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 and the query patterns it serves before mechanics. Slightly long with the explanatory clause 'so you can read off the intermediate nodes and mechanism in ONE call', but every sentence contributes useful signal, so it is close to optimal.

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?

For a 6-parameter graph-traversal tool with no output schema, the description supplies the return shape ({source, target, max_hops, paths:[{hops, nodes, rels}]}), failure behavior, and performance characteristics. Nothing an agent needs to call it correctly is missing.

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 the baseline is 3. The description adds meaning beyond the schema by explaining that both endpoints are resolved first (input-normalization semantics for source/target) and that exceeding max_hops yields a reported no-path result rather than silence. It adds less for max_paths and the optional label params.

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+resource+scope: 'Find the shortest connecting path(s) between two entities in SPOKE'. It goes further and names the query patterns it answers ('how are X and Y connected / what links X to Y') plus 'subgraph-bridge questions', which cleanly separates it from siblings like query_spoke or describe_node.

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?

Explicitly frames the situations that select this tool (connectivity/path questions, subgraph bridging) and contrasts it with the alternative approach of 'probing many queries'. It does not name a specific sibling as the fallback nor state when NOT to use it, so it falls short of a 5.

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