Skip to main content
Glama
Graphicle-AI

Graphicle MCP Server

Official

shortest_path

Read-onlyIdempotent

Find the shortest route between two concepts in a code knowledge graph, following edge direction by default or ignoring it when undirected search is enabled.

Instructions

Find the shortest path between two concepts in the knowledge graph. Follows stored edge direction by default; set undirected=true to ignore it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoThe project to read: its id or key, or with graphicle mcp a synced folder. Defaults to this connection's project.
as_ofNoThe code-graph episode to read: an episode id, a label such as a commit sha, latest or working. Defaults to the project's current code graph.
sourceYesSource concept label or keyword
targetYesTarget concept label or keyword
max_hopsNoMaximum hops to consider
undirectedNoIgnore stored edge direction when searching

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed world, so the safety profile is covered. The description adds real behavioral context beyond that: traversal honors stored edge direction unless overridden, which affects results in a way no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the core operation front-loaded and the directional caveat immediately after. No filler, nothing redundant.

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?

For a read-only graph traversal with full schema coverage and no output schema, the definition is nearly complete: operation, scope, and traversal semantics are all covered. It could still note behavior when no path exists or how max_hops affects failure, but nothing essential 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 coverage is 100%, so all six parameters including repo, as_of, max_hops and undirected are already documented in the schema. The description only restates the undirected semantics already present in the schema, adding no syntax or default detail beyond it — baseline 3.

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 path between two concepts in the knowledge graph.' This is clearly distinct from siblings like get_neighbors (adjacency) and query_graph (pattern matching), so an agent can route without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a conditional usage rule for the traversal mode ('Follows stored edge direction by default; set undirected=true to ignore it'), which is useful, but it never says when to prefer this tool over get_neighbors or query_graph, nor any prerequisite for using it.

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