Skip to main content
Glama

search_trace

Trace search algorithms step by step, showing selected nodes, added or skipped children, frontier, and explored set to debug and verify graph-search behavior.

Instructions

Trace a search algorithm step by step (selected node, children added/skipped, frontier, explored set).

algorithm: bfs | dfs | ucs | greedy | astar | dls | ids | idastar edges: [[from, to, cost], ...]; cost defaults to 1. Undirected unless directed=true. heuristic: {"state": h, ...} for greedy / astar / idastar. mode: "graph" (explored set; don't re-add states in frontier/explored) or "tree" (no explored set). child_order: "alphabetical" or "given" (order edges were listed). tie_break: alphabetical | fifo | lifo. goal_test: "default" (BFS on generation, everything else on selection), "generation" or "selection".

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": {
      "algorithm": "<algorithm>",
      "edges": "<edges>",
      "start": "<start>",
      "goal": "<goal>"
    },
    "name": "search_trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalYes
modeNograph
edgesYes
startYes
directedNo
algorithmYes
goal_testNodefault
heuristicNo
max_depthNo
max_stepsNo
tie_breakNoalphabetical
child_orderNoalphabetical
depth_limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose important semantics — the goal_test default rule (BFS on generation, everything else on selection) and the graph/tree explored-set distinction — but says nothing about failure modes: what happens when a greedy/astar heuristic is omitted, what max_steps truncation looks like, or how incomplete graphs are reported. For a 13-parameter simulator with zero annotation coverage, this is a significant gap.

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?

The purpose sentence is front-loaded and each subsequent line maps to a parameter or a default rule with no filler. The one-line-per-parameter layout is easy to scan. It is appropriately sized; the missing content is a gap in coverage, not a verbosity problem.

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?

An output schema exists, so the description need not explain return values, and it correctly focuses on invocation semantics. But for a 13-parameter, 4-required tool with a complex domain, it leaves the start/goal input format, the max_depth vs depth_limit distinction, and max_steps truncation behavior unexplained — the agent must guess on configuration that materially changes results.

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?

With 0% schema description coverage, the description is the only source of parameter meaning, and it does real work for algorithm, edges, cost default, directed, heuristic, mode, child_order, tie_break, and goal_test. However, five parameters go undocumented: start, goal (state format is unstated), max_steps, and the confusingly similar max_depth (default 10) versus depth_limit (default 3), whose distinction an agent cannot resolve from either schema or description.

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?

The opening sentence names a specific verb and resource — trace a search algorithm step by step — and enumerates what the trace contains (selected node, children added/skipped, frontier, explored set). That is enough for an agent to distinguish this from dpll_trace or heuristic_check. It stops short of explicitly contrasting with any sibling, which holds it at 4 rather than 5.

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?

Usage is implied rather than stated: an agent can infer this is the tool for visualizing an uninformed/informed search run, and the mode field's explanation (graph vs tree, explored set behavior) implicitly guides configuration choice. There is no explicit when-to-use, when-not-to-use, or comparison against alternatives such as heuristic_check.

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