Skip to main content
Glama

record_command_result

Captures an agent-supplied command result—command, exit code, stdout, and stderr—in an evidence bundle to document execution outcomes without executing or verifying the command.

Instructions

Records the self-reported execution result of a command supplied by the agent (provenance: agent_reported). Does not execute shell commands or independently verify command output.

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": {
      "bundleId": "<bundleId>",
      "command": "<command>",
      "exitCode": "<exitCode>",
      "stdout": "<stdout>",
      "stderr": "<stderr>"
    },
    "name": "record_command_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
stderrYesThe standard error captured from the command.
stdoutYesThe standard output captured from the command.
commandYesThe exact command string that was executed.
bundleIdYesThe unique identifier of the evidence bundle.
exitCodeYesThe exit code returned by the command execution.
workspaceNameNoOptional registered workspace/package name (defaults to primary root).
workspacePathNoOptional workspace path hint.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • addedInput schema / properties / workspaceName
      Added value: +{
      +  "description": "Optional registered workspace/package name (defaults to primary root).",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A3.9/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 behavioral burden and usefully discloses the provenance label agent_reported plus the fact that no execution or independent verification occurs. However, for a mutation-style recording tool it does not explain whether records are immutable or overwritten, what happens if the bundle does not exist, whether authentication or authorization is required, or what is returned.

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 two tight sentences that front-load the action and immediately clarify the non-execution scope. Every sentence adds useful information and there is no redundant wording.

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

Completeness3/5

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

The description covers the core distinction an agent must understand: this records an agent-reported result rather than executing or verifying it. Given the absence of annotations and an output schema, however, it leaves gaps around record mutability, error behavior, and return expectations.

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 100%, so the input schema already documents all seven parameters, including bundleId, command, exitCode, stdout, stderr, and the optional workspace fields. The description adds no parameter-level meaning beyond that, so the baseline 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 uses a specific verb and resource: it records a self-reported command execution result supplied by the agent. It also clearly distinguishes this from execution tools by stating it does not execute shell commands or independently verify output, which sets it apart from siblings such as execute_verified_command.

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 gives clear usage context by identifying this as the tool for recording an already-supplied agent-reported result, and it explicitly rules out execution and verification. It does not name the alternative execution/verification sibling directly, but the when-not guidance is strong enough for correct selection.

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