Skip to main content
Glama

haldir_log_audit_action

Records each tool call to a tamper-evident audit trail using SHA-256 hash chaining and Merkle-tree proofs, so actions remain retroactively verifiable.

Instructions

Log a tool call to the audit trail. The entry is SHA-256 hash-chained and leaf-hashed into the tenant's RFC 6962 Merkle tree so it's retroactively provable.

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": {
      "session_id": "<session_id>",
      "tool": "<tool>",
      "action": "<action>"
    },
    "name": "haldir_log_audit_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
toolYesTool name (e.g. 'stripe', 'postgres')
actionYesVerb (e.g. 'charge', 'read')
detailsNoArbitrary JSON metadata
cost_usdNoUSD charged by this action
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.3

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real value by disclosing the SHA-256 hash chaining and RFC 6962 Merkle leaf insertion, which tells the agent entries are tamper-evident and append-only. It omits other operationally important traits: permission requirements, whether duplicate or retried logs create separate entries, latency or cost of writing, and what happens on failure.

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, purpose front-loaded and the cryptographic guarantee layered behind it. Nothing is wasted and no clause merely restates the tool name.

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 five-parameter write tool with a nested details object and no output schema, the description adequately establishes what the tool does and the durability property of what it writes. The main residual gap is that it never hints at what the call returns, such as an entry hash or leaf index that a caller would need to reference the record later, though the absence of an output schema makes that less critical.

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 80%, so the schema already explains tool, action, details and cost_usd; the description adds no further meaning to any of them. Only session_id lacks a schema description, and the description does not compensate for it. Baseline 3 applies when the schema does the heavy lifting.

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 first sentence states a specific verb and resource: log a tool call into the audit trail. That cleanly separates it from read-side siblings such as haldir_query_audit_trail and haldir_verify_audit_chain. It stops short of naming an alternative explicitly, so it lands at clear-but-not-differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when this must be called relative to the action it records, whether it is mandatory for every tool call, or whether some calls should skip it. It also never contrasts itself with haldir_verify_audit_chain or haldir_build_evidence_pack, which an agent could otherwise confuse with this write operation.

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