Skip to main content
Glama

normalize_trace

Normalize any tool-call trace into the canonical Agentsnap format and generate a SHA-256 fingerprint, enabling fast byte-level comparison between runs.

Instructions

Coerce an arbitrary tool-call trace (an array of {name,args} entries or a partial Trace object) into the canonical agentsnap Trace shape. Returns the normalized trace plus a SHA-256 fingerprint hash computed over the canonical (key-sorted) JSON, so two runs can be byte-compared cheaply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputNoOptional input string to embed in trace.input.
modelNoOptional model identifier to embed in trace.model.
traceYesEither an array of tool-call entries (each {name, args, result?, error?}) or a partial Trace object with a tools[] field.
outputNoOptional output string to embed in trace.output.
Behavior4/5

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

With no annotations, the description carries the full burden of disclosure. It reveals key behavioral details: coercion into a canonical shape, key-sorting for JSON, SHA-256 hashing, and the return of a normalized trace plus fingerprint. It does not mention error handling or mutation behavior, but these are less critical for a pure normalization function and the disclosed details are substantive.

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 sentences, front-loaded with the primary action, then the return value and a rationale for the fingerprint. Every word earns its place, with no filler. The length is appropriate for the tool's complexity.

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?

The description covers the core behavior and return value, which is essential given there is no output schema. It explains the purpose of the fingerprint (byte-comparison) and the canonicalization process. Missing details include error handling and relationship to sibling tools, but overall it is a self-contained and sufficient description for an agent to invoke the tool correctly.

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 100%, so the baseline is 3. The description adds conceptual meaning (e.g., 'coerce', 'canonical', 'key-sorted JSON') that enriches parameter understanding, but it does not annotate individual parameters beyond the schema. The schema already describes 'trace' as either an array or partial Trace, and input/output/model fields are self-explanatory. The description does not need to compensate.

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 uses the specific verb 'Coerce' and clearly identifies the resource ('arbitrary tool-call trace') and the goal ('canonical agentsnap Trace shape'). It also distinguishes itself from sibling tools (validate_snapshot, diff_traces) by focusing on normalization and fingerprinting, not validation or diffing.

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 description implies usage scenarios ('so two runs can be byte-compared cheaply') but does not explicitly state when to use this tool versus alternatives like diff_traces or validate_snapshot. No exclusions or preconditions are mentioned, leaving the agent to infer that normalization is a prerequisite for other operations.

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/MukundaKatta/agentsnap-mcp'

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