Skip to main content
Glama

Runledge

Record an agent action

record_action
Idempotent

Record an action an agent took (or was blocked from taking) with tokens, cost and value. Pass idempotency_key to make retries safe. Requires member role.

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": {
      "workspace_id": "<workspace_id>",
      "agent": "<agent>",
      "action_type": "<action_type>",
      "target_system": "<target_system>",
      "status": "<status>"
    },
    "name": "record_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
agentYes
modelNo
run_idNo
statusYes
metadataNo
tokens_inNo
latency_msNo
tokens_outNo
action_typeYes
approval_idNo
cost_centerNo
compensationNo
workspace_idYes
minutes_savedNo
target_systemYes
blocked_reasonNo
model_cost_usdNo
idempotency_keyNo
decision_record_idNo
value_protected_usdNo
compensates_action_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the bar is lower, and the description still adds two pieces of real context: the member-role auth requirement and the fact that idempotency_key exists to make retries safe. It does not explain what happens on a duplicate key or how blocked vs executed statuses affect downstream behavior.

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?

Three short sentences, front-loaded with the core purpose, with the idempotency and auth notes following in logical order. No filler, though the space saved is partly the reason the parameter surface goes unexplained.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 21-parameter, nested-object mutation tool with no output schema and zero schema descriptions, this definition is far too thin — an agent cannot infer how to populate compensation, approval linkage, or status-dependent fields. The safety and idempotency framing is good, but the input contract is essentially undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 21 parameters, so the description carries the full burden and only names tokens, cost, value and idempotency_key. It says nothing about status enum values, blocked_reason, decision_record_id, compensates_action_id, or the nested compensation object, which is the most semantically loaded and least obvious part of the schema.

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?

States a specific verb and resource: record an action taken or blocked, capturing tokens, cost and value. The parenthetical '(or was blocked from taking)' usefully widens the scope to blocked attempts. It does not distinguish itself from siblings like evaluate_action or execute_brokered_action, leaving that to inference.

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

Usage Guidelines3/5

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

Usage is only implied — you record after an action occurs, and the description notes a prerequisite ('Requires member role'). It never states when to prefer this over evaluate_action (pre-check) or execute_brokered_action (brokered execution), which are the obvious routing alternatives.

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.

Resources