Skip to main content
Glama

调用存证审计

audit.record
Read-only

记录一次跨 Agent 协作的调用存证,返回不可篡改的内容哈希(SHA-256)。用于多 Agent 任务结算前的存证审计:当需要证明某 Agent 在何时对何资源执行了何操作、或为跨 Agent 任务结算留痕时使用。参数:actor(执行方标识)、action(操作)、target(目标资源,可选)、detail(补充信息对象,可选)。返回 record_id、digest(内容哈希)、created_at(UTC 时间)。Example: {"actor":"agent-a","action":"tool.call","target":"weather_query","detail":{"cost":0.01}}

Input Schema

NameRequiredDescriptionDefault
actorYes执行方标识(Agent 名/ID/角色),如 agent-a
actionYes执行的操作,如 tool.call、task.complete、resource.read
detailNo补充信息,如 cost、tokens、备注(可选)
targetNo目标资源,如工具名、接口路径、资源 ID(可选)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior2/5

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

The description clearly portrays a write: it records an attestation, persists it, and returns an immutable hash plus a record_id and created_at timestamp. However, the annotations declare readOnlyHint=true, which conflicts with what the description says the tool does. The description is otherwise rich (immutability, UTC timestamps, example payload), so it is not a total void, but the contradiction with the structured safety hint is the dominant issue.

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?

It is front-loaded with purpose, then when-to-use, then parameters, then return values, then a JSON example, so it reads well. The parameter recap duplicates the 100%-covered schema, so a little space could be reclaimed.

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?

With no output schema, the description usefully enumerates the returned fields (record_id, digest, created_at UTC) and supplies a complete example call. It does not cover idempotency, error behavior, or how the digest is computed over the fields, which leaves minor gaps for a persistence tool.

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 schema already documents all four parameters including which are optional. The description restates them (actor, action, target optional, detail optional) with the same glosses plus a worked example, which adds only marginal value beyond the structured fields.

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 description states a specific verb and resource: recording a cross-Agent invocation attestation and returning a tamper-proof SHA-256 content hash. The purpose is unambiguous, but it never differentiates itself from the nearby metering.record sibling, even though both relate to cross-Agent settlement accounting, so an agent has to guess which one to use.

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

Usage Guidelines4/5

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

It names concrete invocation contexts: when you need to prove which Agent did what to which resource and when, or to leave an audit trail before cross-Agent task settlement. It gives no explicit exclusions and never names metering.record as the alternative, so the boundary with that sibling remains implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.