Skip to main content
Glama

cos_graph_path

Read-onlyIdempotent

Trace the shortest route between two UIDs in a knowledge graph, with an optional hop limit.

Instructions

Shortest path between two nodes (either direction).

Args: source_uid: Origin uid (auto-resolves raw paths; see cos_graph_impact for the scheme). target_uid: Destination uid (same rules as source_uid). max_hops: BFS depth limit (default 5).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_hopsNo
source_uidYes
target_uidYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Adds meaningful behavioral context beyond annotations: describes BFS depth limit (max_hops) and auto-resolution of raw paths. The annotations already indicate read-only and idempotent behavior, so the description enriches that with algorithmic details, though failure behavior is not covered.

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?

Highly concise: a one-sentence purpose followed by clear bullet-style parameter descriptions. Every line adds value with no redundancy or filler.

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?

Covers the essential aspects: purpose, parameter behavior, and algorithmic constraints. The output schema handles return details. Missing only explicit guidance on when to prefer this over sibling graph tools, but overall is complete for practical use.

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

Parameters5/5

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

Schema coverage is 0%, so the description fully compensates by explaining all three parameters: source_uid and target_uid resolution rules, and max_hops as a BFS depth limit with default 5. This provides semantics the schema lacks entirely.

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 description clearly states 'Shortest path between two nodes (either direction)' with a specific verb and resource. It distinguishes from sibling graph tools like cos_graph_trace and cos_graph_search by focusing on the path computation and bidirectional nature.

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?

Provides clear context for when to use (finding shortest paths between two nodes), but does not explicitly state exclusions or direct alternatives to other tools. It references cos_graph_impact for the resolution scheme, which is a helpful pointer but not a usage alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kouroshez/coding-os'

If you have feedback or need assistance with the MCP directory API, please join our Discord server