Skip to main content
Glama

timeout

Read-only

Run a command with a time limit, automatically terminating if exceeded. Captures output and returns JSON to prevent runaway commands from blocking agent workflows.

Instructions

Run a command with a bounded time limit, automatically terminating it if it exceeds the duration. Captures stdout/stderr up to max_output_bytes. Returns JSON with command output and whether it timed out. Use to prevent runaway commands from blocking agent workflows. Not for introducing delays — use 'sleep' to pause. Not for CPU priority — use 'nice'. See also 'sleep', 'nice'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
command_argsNoCommand and arguments to run.
dry_runNoReport without running the command.
max_output_bytesNoMaximum captured stdout/stderr bytes each.
secondsYesTimeout in seconds.
Behavior1/5

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

The annotation declares readOnlyHint=true, but the description describes a command execution tool that can have side effects (running arbitrary commands), which is a serious contradiction. No further behavioral context is added beyond the direct contradiction.

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 four sentences, all substantive, with no wasted words. Front-loaded with primary action, then behavior, then usage guidance.

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?

The description covers purpose, behavior, usage guidelines, and return format (JSON with output and timeout flag). Lacks mention of error handling or side effects but is sufficient for a tool with no output schema and good annotations aside from the contradiction.

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% with good parameter descriptions. The description doesn't add significant meaning beyond the schema, but it reinforces the behavior of max_output_bytes. Baseline 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 runs a command with a bounded time limit, automatically terminating it if exceeded, and captures output. It distinguishes itself from siblings like 'sleep' and 'nice' via explicit exclusion statements.

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

Usage Guidelines5/5

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

The description explicitly states when to use the tool ('prevent runaway commands') and when not to, providing specific alternatives ('use sleep to pause', 'use nice for CPU priority'), and references sibling tools.

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/caseSHY/AI-CLI'

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