Skip to main content
Glama

verify_chain

Detect tampering in agent activity logs by verifying the SHA-256 hash chain. Optionally check a specific agent's records.

Instructions

Verify the integrity of the audit trail hash chain. Each entry's SHA-256 hash includes the previous entry's hash — if any record was modified, the chain breaks and this will report where.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idNoVerify chain for a specific agent only. If omitted, verifies all entries.

Implementation Reference

  • Handles the 'verify_chain' tool call: sends a POST /v1/verify request with an optional agent_id, and returns whether the chain is intact or broken with details.
    if (name === "verify_chain") {
      const body = args.agent_id ? { agent_id: args.agent_id } : {};
      const result = await apiCall("POST", "/v1/verify", body);
    
      if (result.valid) {
        return {
          content: [
            {
              type: "text",
              text: `Chain intact. ${result.entries_verified} entries verified, no tampering detected.`,
            },
          ],
        };
      }
    
      return {
        content: [
          {
            type: "text",
            text: `Chain broken at sequence ${result.broken_at_sequence}. Reason: ${result.reason}`,
          },
        ],
      };
    }
  • Input schema for 'verify_chain' tool: accepts an optional agent_id string to filter verification to a specific agent.
    inputSchema: {
      type: "object",
      properties: {
        agent_id: {
          type: "string",
          description: "Verify chain for a specific agent only. If omitted, verifies all entries.",
        },
      },
    },
  • index.js:103-118 (registration)
    Registers 'verify_chain' as a tool in the ListToolsRequestSchema handler, providing its name, description, and input schema.
    {
      name: "verify_chain",
      description:
        "Verify the integrity of the audit trail hash chain. " +
        "Each entry's SHA-256 hash includes the previous entry's hash — " +
        "if any record was modified, the chain breaks and this will report where.",
      inputSchema: {
        type: "object",
        properties: {
          agent_id: {
            type: "string",
            description: "Verify chain for a specific agent only. If omitted, verifies all entries.",
          },
        },
      },
    },
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the core behavior: verifies chain integrity, uses SHA-256, reports break location. However, it does not explicitly state whether the tool is read-only or has side effects, which is a minor gap.

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?

The description is extremely concise: two sentences that efficiently convey purpose, mechanism, and behavior. No redundant or unnecessary information.

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 simple tool with one optional parameter and no output schema, the description covers the key aspects: what it verifies, how it works, and what indicates tampering. It could optionally detail the output format (e.g., break location), but this is not essential for correct invocation.

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?

The description does not mention the agent_id parameter directly. However, the input schema already describes it clearly (100% coverage). The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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 clearly states the tool's purpose: 'Verify the integrity of the audit trail hash chain.' It explains the cryptographic mechanism (SHA-256 hash chain) and distinguishes itself from sibling tools (query_actions, record_action) by focusing exclusively on integrity verification.

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?

The description implicitly tells when to use this tool: when you need to detect data tampering via hash chain breaks. It does not explicitly state alternatives or when not to use, but the purpose is clear enough that an agent can infer appropriate usage.

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/JoeyBrar/agentseal-mcp'

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