Skip to main content
Glama

track_action

Record AI agent actions with signed receipts, automatically hashing input and output via SHA-256. Logs model usage, costs, latency, and constraints, returning a unique receipt ID for audit and verification.

Instructions

Create a completed Ed25519-signed receipt for an AI agent action with automatic SHA-256 hashing of input and output data. Records model usage, costs, latency, and constraint evaluations. Returns the signed receipt with receipt_id for future reference. Use this as the primary tool for recording agent actions — prefer over create_receipt + complete_receipt for single-step actions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction name being recorded (e.g., "generate_code", "summarize_text", "classify_intent")
inputNoInput data passed to the agent — automatically hashed with SHA-256, raw data is never stored
outputNoOutput produced by the agent — automatically hashed with SHA-256, raw data is never stored
output_summaryNoHuman-readable summary of the output for audit purposes (max 500 chars recommended)
modelNoAI model used (e.g., "claude-sonnet-4-20250514", "gpt-4o", "gemini-2.0-flash")
tokens_inNoInput tokens consumed by the model
tokens_outNoOutput tokens generated by the model
cost_usdNoExecution cost in USD (e.g., 0.0045)
latency_msNoTotal execution time in milliseconds
tool_callsNoNames of tools called during this action (e.g., ["web_search", "code_exec"])
tagsNoArbitrary tags for filtering and categorization (e.g., ["production", "critical"])
confidenceNoConfidence score for the output quality, 0.0 to 1.0
metadataNoArbitrary key-value metadata attached to the receipt
parent_receipt_idNoParent receipt ID for chaining — links this receipt to a previous step
chain_idNoChain identifier for grouping related receipts — auto-generated if not provided
constraintsNoConstraint definitions to evaluate against this receipt (e.g., max_latency_ms, max_cost_usd, min_confidence)
expires_atNoISO 8601 datetime when this receipt expires (e.g., "2026-12-31T23:59:59Z")
ttl_msNoTime-to-live in milliseconds from now — alternative to expires_at

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removedv0.2.11
  3. Changed18 schema fields changedv0.2.10
    • changedInput schema / properties / action / description
      Previous value: -"The action being recorded (e.g., \"generate_summary\", \"classify_email\")"New value: +"Action name being recorded (e.g., \"generate_code\", \"summarize_text\", \"classify_intent\")"
    • changedInput schema / properties / chain_id / description
      Previous value: -"Chain ID (auto-generated if not provided)"New value: +"Chain identifier for grouping related receipts — auto-generated if not provided"
    • changedInput schema / properties / confidence / description
      Previous value: -"Confidence score 0-1"New value: +"Confidence score for the output quality, 0.0 to 1.0"
    • changedInput schema / properties / constraints / description
      Previous value: -"Constraint definitions to evaluate"New value: +"Constraint definitions to evaluate against this receipt (e.g., max_latency_ms, max_cost_usd, min_confidence)"
    • changedInput schema / properties / cost_usd / description
      Previous value: -"Cost in USD"New value: +"Execution cost in USD (e.g., 0.0045)"
    • changedInput schema / properties / expires_at / description
      Previous value: -"ISO datetime when this receipt expires"New value: +"ISO 8601 datetime when this receipt expires (e.g., \"2026-12-31T23:59:59Z\")"
    • changedInput schema / properties / input / description
      Previous value: -"The input data (will be automatically hashed)"New value: +"Input data passed to the agent — automatically hashed with SHA-256, raw data is never stored"
    • changedInput schema / properties / latency_ms / description
      Previous value: -"Latency in milliseconds"New value: +"Total execution time in milliseconds"
    • changedInput schema / properties / metadata / description
      Previous value: -"Arbitrary metadata"New value: +"Arbitrary key-value metadata attached to the receipt"
    • changedInput schema / properties / model / description
      Previous value: -"AI model used (e.g., \"gpt-4\", \"claude-3\")"New value: +"AI model used (e.g., \"claude-sonnet-4-20250514\", \"gpt-4o\", \"gemini-2.0-flash\")"
    • changedInput schema / properties / output / description
      Previous value: -"The output data (will be automatically hashed)"New value: +"Output produced by the agent — automatically hashed with SHA-256, raw data is never stored"
    • changedInput schema / properties / output_summary / description
      Previous value: -"Human-readable summary of the output"New value: +"Human-readable summary of the output for audit purposes (max 500 chars recommended)"
    • changedInput schema / properties / parent_receipt_id / description
      Previous value: -"Parent receipt ID for chaining"New value: +"Parent receipt ID for chaining — links this receipt to a previous step"
    • changedInput schema / properties / tags / description
      Previous value: -"Tags for categorization"New value: +"Arbitrary tags for filtering and categorization (e.g., [\"production\", \"critical\"])"
    • changedInput schema / properties / tokens_in / description
      Previous value: -"Input tokens consumed"New value: +"Input tokens consumed by the model"
    • changedInput schema / properties / tokens_out / description
      Previous value: -"Output tokens generated"New value: +"Output tokens generated by the model"
    • changedInput schema / properties / tool_calls / description
      Previous value: -"Tools called during the action"New value: +"Names of tools called during this action (e.g., [\"web_search\", \"code_exec\"])"
    • changedInput schema / properties / ttl_ms / description
      Previous value: -"Time-to-live in milliseconds from now"New value: +"Time-to-live in milliseconds from now — alternative to expires_at"
  4. First observedv0.2.8

TDQS

A4.6/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses automatic SHA-256 hashing, no raw data storage, and returns signed receipt. Lacks explicit mention of write nature but is clear enough. Good behavioral context beyond schema.

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, no waste. First sentence packs core functionality, second provides usage guidance. Efficient and well-structured.

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?

Given 18 parameters, nested objects, and no output schema, description covers main purpose, key behaviors, and usage. Mentions return of receipt_id, sufficient for selection. Could elaborate on constraint evaluation but schema covers details.

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% (18 parameters all described), baseline is 3. Description adds value by explaining automatic hashing for input/output and constraint evaluation, which is beyond schema descriptions.

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?

Description clearly states the tool creates a completed Ed25519-signed receipt for AI agent actions with automatic hashing. It also explicitly differentiates from siblings by recommending use over create_receipt + complete_receipt for single-step actions.

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?

Explicit guidance: 'Use this as the primary tool for recording agent actions — prefer over create_receipt + complete_receipt for single-step actions.' This clearly indicates when and why to use this tool over alternatives.

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