Skip to main content
Glama

graph_traverse

Read-only

Traverse a project index without loading full file bodies: inspect node metadata, resolve relevant notes, skills, rules, files, and symbols, then open capped file or symbol spans.

Instructions

Traverse the project index without loading bodies. node|children return metadata; resolve finds relevant notes, skills, rules, files and symbols with size estimates; open retrieves one file or symbol span capped at 4096 UTF-8 bytes by default.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "graph_traverse"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoNode id (required for node/children/open), e.g. rule:rust-own-borrow-over-clone, skill:code/rust, code:src/lib/graph/traverse.ts, vault:projects/<slug>/context.md
fullNoopen: return the whole file instead of the 4KB cap
taskNoTask text (required for resolve)
limitNoMax children/resolve items (default 100/30, max 1000)
actionYesTraversal action
max_bytesNoopen: maximum UTF-8 content bytes to return (default 4096; max 8388608)
offset_bytesNoopen: UTF-8 byte offset for the next page (default 0)
workspace_pathNoAbsolute thread workspace directory; must map to this project. Omit only when the server cwd is the thread workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.15.1
    • changedInput schema / properties / limit / description
      Previous value: -"Max children/resolve items (default 100/30)"New value: +"Max children/resolve items (default 100/30, max 1000)"
    • addedInput schema / properties / limit / maximum
      Added value: +1000
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / max_bytes
      Added value: +{
      +  "description": "open: maximum UTF-8 content bytes to return (default 4096; max 8388608)",
      +  "maximum": 8388608,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset_bytes
      Added value: +{
      +  "description": "open: UTF-8 byte offset for the next page (default 0)",
      +  "maximum": 8388608,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Addedv0.13.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true, so the description carries the rest. It usefully discloses that traversal happens 'without loading bodies' and that open output is capped at 4096 UTF-8 bytes by default, which is meaningful behavioral context. It stops short of noting pagination behavior, permissions, or rate limits.

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?

A single dense sentence, front-loaded with the core operation and then the per-action breakdown. Efficient, though the semicolon-separated clause list is slightly compressed and could be easier to scan.

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?

With no output schema, the description usefully characterizes return values per action (metadata, size estimates, file/symbol spans). Combined with the readOnly annotation this covers the essentials; only pagination and cross-tool routing are unaddressed.

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 description coverage is 100%, so the schema already documents all 8 parameters with their per-action requirements and defaults. The description reinforces some of this (byte cap, size estimates) but adds little beyond what the schema already states, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (traverse) and resource (project index) and enumerates the four action modes with their outputs. It distinguishes the actions from each other, though it does not explicitly differentiate itself from siblings like graph_related or search.

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 action breakdown implies when each mode applies (metadata vs. relevance resolution vs. file retrieval), giving implied usage. However, there is no explicit guidance on choosing this tool over graph_related, graph_cross_project, or search, nor any exclusions.

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