Skip to main content
Glama

Trace and compare behaviour

port_trace
Read-onlyIdempotent

Records chosen node properties per physics tick in original and ported engines, then compares traces to identify first divergence, max/mean error, and whether integration or timing differs.

Instructions

action:"harness" returns (and with out writes) a small logger for the engine (ReversePortTrace.gd/.cs/.js/.h) that records the chosen properties of one node per physics tick to JSON with a fixed seed and tick rate. Run it in the original and in the port from the same start, then action:"compare" {a, b, tolerance} resamples both by time (different tick rates are fine), reports per property the first divergence, max and mean error and whether the error grows (integration differs: delta, damping, gravity, friction), differs from tick 0 (units, axes, spawn) or jumps at one moment (an event happened differently). port_verify already flags timing/randomness/order differences statically; this is the runtime proof.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "port_trace"
  }
}

Input Schema

NameRequiredDescriptionDefault
aNocompare: trace JSON from the original.
bNocompare: trace JSON from the port.
outNoharness: write the logger to this file.
nodeNoharness: node path to watch (default the harness's target).
ticksNoharness: ticks to record (default 300).
actionNoharness (default) or compare.
engineNoharness: godot, unity, threejs or unreal.
axisMapNocompare: reorder/negate b's vector components, e.g. ["0","2","-1"] maps b=[x,y,z] to [x,z,-y].
toleranceNocompare: allowed error per sample (default 0.01).
propertiesNoharness: properties to log (default ["position"]; velocity, rotation, custom fields).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.25.0

TDQS

A4/5.0
Behavior2/5

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

The description discloses rich behavior beyond the annotations — fixed seed and tick rate, time-based resampling that tolerates differing tick rates, and a taxonomy of divergence causes (growing error = integration, error from tick 0 = units/axes/spawn, single jump = event). However, it explicitly says that with the `out` parameter the harness writes a logger file to disk, while the annotations declare readOnlyHint=true and destructiveHint=false; an agent trusting the annotation would not expect filesystem writes. The disclosure itself is honest, which keeps this above a 1, but the mismatch with the annotation is real.

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

Conciseness3/5

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

Every sentence carries real information, and the closing contrast with port_verify is valuable, but it is delivered as a single dense run-on paragraph with awkward phrasing such as '(and with out writes)'. There is no front-loaded one-line summary of what the tool is, so an agent must parse the whole block before it can act.

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 10-parameter, no-output-schema tool, the description compensates well by describing what the compare report contains (first divergence, max and mean error, growth classification) and by spelling out the harness/compare workflow. The main gap is that it never says what harness returns when `out` is omitted, which matters given the write/read ambiguity.

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

Parameters4/5

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

Schema coverage is 100%, so individual parameter meanings are already documented, but the description adds semantics the schema cannot: it ties `out` to the harness write mode, pairs `a`/`b` with the compare mode, and explains the cross-call relationship (harness JSON feeds compare). It does not discuss `axisMap` or `tolerance` in prose, leaving those entirely to the schema.

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 states two concrete capabilities with specific verbs and resources: action:"harness" produces a logger script (ReversePortTrace.gd/.cs/.js/.h) that records node properties per physics tick, and action:"compare" resamples two traces and reports per-property divergence. It also distinguishes itself from a sibling by name, contrasting port_verify's static flags with this tool's 'runtime proof'.

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?

It prescribes the workflow explicitly: run harness in the original and in the port from the same start, then compare. It also names the alternative (port_verify) and the condition that separates them (static timing/randomness/order checks vs runtime proof), which is exactly the routing information an agent needs.

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