Skip to main content
Glama

record_command_exit

Record the exit code of a subprocess command execution, signaling success (0) or failure (non-zero) for context optimization.

Instructions

Record the exit code of a command that was generated and executed.

STRONG signal: a real subprocess produced a real exit code. Convention: exit_code == 0 → "success", anything else → "failure".

Args: request_id: the trace_id from the optimize_context call exit_code: subprocess exit code; 0 = success command: optional short representation of what was run

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandNo
exit_codeYes
request_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description fully explains the meaning of exit codes (0=success, non-zero=failure) and emphasizes that it is a strong signal. It does not cover side effects or permissions, but for this simple tool it suffices.

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 well-structured with a clear purpose, a note about strong signal, convention explanation, and an args list. Every sentence adds value, no redundant information.

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

Completeness5/5

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

For a simple tool with 3 parameters and no annotations, the description covers purpose, parameter semantics, and conventions completely. Output schema exists but its explanation is unnecessary. The description is self-contained and sufficient.

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

Parameters5/5

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

Despite 0% schema description coverage, the description thoroughly explains each parameter: request_id is the trace_id from optimize_context, exit_code is the subprocess exit code, and command is an optional representation. This adds significant value beyond 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 verb 'record' and the resource 'exit code of a command', distinguishing it from sibling tools like record_ci_result and record_test_result. It is specific and unambiguous.

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 explains that this is for a real subprocess exit code, providing context on when to use it. However, it does not explicitly exclude situations or mention alternatives, though sibling names imply differentiation.

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/juyterman1000/entroly'

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