Skip to main content
Glama

record_action

Record agent actions to an immutable audit hash trail. Log action type, parameters, reasoning, and authorization after every significant operation for cryptographic proof.

Instructions

Record an agent action to the AgentSeal audit hash trail. Call this after every significant action (sending emails, modifying files, running queries, making API calls) to create a cryptographically sealed record of what happened and why.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesIdentifier for this agent (e.g. 'research-bot', 'finance-agent')
action_typeYesWhat type of action was taken (e.g. 'email:send', 'file:write', 'api:call', 'db:query')
action_paramsNoParameters of the action (e.g. {to: 'user@example.com', subject: '...'})
reasoningNoWhy you decided to take this action — your chain of thought
authorized_byNoWho or what authorized this action (e.g. 'user:alice', 'policy:auto-approve')

Implementation Reference

  • index.js:42-78 (registration)
    Tool registration in ListToolsRequestSchema handler — defines the 'record_action' tool name, description, and input schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: "record_action",
          description:
            "Record an agent action to the AgentSeal audit hash trail. " +
            "Call this after every significant action (sending emails, modifying files, " +
            "running queries, making API calls) to create a cryptographically sealed record " +
            "of what happened and why.",
          inputSchema: {
            type: "object",
            properties: {
              agent_id: {
                type: "string",
                description: "Identifier for this agent (e.g. 'research-bot', 'finance-agent')",
              },
              action_type: {
                type: "string",
                description:
                  "What type of action was taken (e.g. 'email:send', 'file:write', 'api:call', 'db:query')",
              },
              action_params: {
                type: "object",
                description: "Parameters of the action (e.g. {to: 'user@example.com', subject: '...'})",
              },
              reasoning: {
                type: "string",
                description: "Why you decided to take this action — your chain of thought",
              },
              authorized_by: {
                type: "string",
                description: "Who or what authorized this action (e.g. 'user:alice', 'policy:auto-approve')",
              },
            },
            required: ["agent_id", "action_type"],
          },
        },
  • Input schema for record_action — requires agent_id and action_type, with optional action_params, reasoning, and authorized_by.
    inputSchema: {
      type: "object",
      properties: {
        agent_id: {
          type: "string",
          description: "Identifier for this agent (e.g. 'research-bot', 'finance-agent')",
        },
        action_type: {
          type: "string",
          description:
            "What type of action was taken (e.g. 'email:send', 'file:write', 'api:call', 'db:query')",
        },
        action_params: {
          type: "object",
          description: "Parameters of the action (e.g. {to: 'user@example.com', subject: '...'})",
        },
        reasoning: {
          type: "string",
          description: "Why you decided to take this action — your chain of thought",
        },
        authorized_by: {
          type: "string",
          description: "Who or what authorized this action (e.g. 'user:alice', 'policy:auto-approve')",
        },
      },
      required: ["agent_id", "action_type"],
    },
  • Handler for record_action — sends a POST /v1/entries API call with agent_id, action_type, action_params, reasoning, and authorization, then returns the sequence and hash.
    if (name === "record_action") {
      const result = await apiCall("POST", "/v1/entries", {
        agent_id: args.agent_id,
        action_type: args.action_type,
        action_params: args.action_params || {},
        reasoning: args.reasoning || null,
        authorization: args.authorized_by
          ? { authorized_by: args.authorized_by }
          : null,
      });
    
      return {
        content: [
          {
            type: "text",
            text: `Action recorded. Sequence: ${result.sequence}, Hash: ${result.entry_hash}`,
          },
        ],
      };
    }
Behavior3/5

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

With no annotations, description carries full burden. Mentions 'cryptographically sealed record' hinting at immutability, but does not disclose side effects, permanence, or system impact. Adequate for a simple append action, but could be more detailed.

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 efficiently convey purpose and usage. No extraneous information; every word adds value.

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 the tool's complexity (5 params, nested objects, no output schema), the description covers purpose and usage well but omits mention of return value or additional behavioral context. Nearly complete.

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 baseline 3. Description does not add extra parameter meaning beyond the schema; all parameters are already well-described in the schema.

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 records actions to an audit trail, with specific verb 'Record' and resource 'agent action'. It distinguishes from siblings (query_actions, verify_chain) by focusing on recording, not querying or verifying.

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?

Explicitly advises calling 'after every significant action' with examples, providing strong when-to-use guidance. Lacks explicit when-not-to-use instructions but context with sibling tools implies alternatives.

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