Skip to main content
Glama

map_path

Finds the shortest structural path between two symbols, revealing how code areas connect through imports, calls, inheritance, or containment.

Instructions

Shortest structural path between two symbols in the static map (over imports/calls/inheritance/containment). Useful to understand how two areas connect before reading code. Static and possibly stale — confirm the load-bearing hops with nav_references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
fromYesMap node ID, e.g. "py:src/auth/session.py#SessionStore.refresh" or "ts:src/index.ts" (file node)
maxLenNo
tokenBudgetNoMax tokens for the response. Lists are truncated to fit, with a note saying what was dropped and how to get it back.
includeReferencesNoAlso traverse noisy 'references' edges
Behavior4/5

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

Discloses that the path is 'shortest structural path' and 'static and possibly stale', which are important behavioral traits. Since there are no annotations, these add value. However, it does not describe the response format or error behavior (e.g., no path found), slightly reducing completeness.

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 efficient sentences: first defines purpose, second gives usage guidance and a caution. No fluff, every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While purpose and usage are clear, the description omits response structure (e.g., the format of the path, whether it is a list of node IDs) and handling of edge cases like no path. Without an output schema, these gaps reduce completeness.

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 60%, and the description indirectly maps 'from' and 'to' as symbols but adds no details beyond the schema's own descriptions for maxLen, tokenBudget, or includeReferences. It provides minimal additional context, earning a middle score.

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 specifies the verb 'find shortest structural path' and the resource 'static map', with explicit mention of relations (imports/calls/inheritance/containment). It clearly distinguishes from siblings like map_neighbors or map_overview.

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?

Provides a concrete use case ('understand how two areas connect before reading code') and explicitly warns about staleness, directing to nav_references for confirmation. This tells the agent when and when not to rely on this tool.

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/LSDIPPOLLC/transcend-mcp'

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