Skip to main content
Glama

peek

Observe running AI CLI agents for a short time window, capturing natural-language messages and optional tool call events without raw output.

Instructions

One-shot short observation window for running child agents. Returns only natural-language message events, and optionally normalized tool_call events, observed during this call; not a history API, not gapless streaming, and not stdout/stderr tailing. In v1, message extraction is supported for Codex, Claude, OpenCode, Gemini, and best-effort Forge Summary/Completed successfully lines. Forge tool calls are low-precision Execute/Finished markers and never include command output. Tool calls exclude raw tool output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidsYesProcess IDs returned by run. Duplicates are deduplicated server-side, preserving first occurrence order. Unknown PIDs are returned per process as not_found.
peek_time_secNoOptional positive integer observation window in seconds. Defaults to 10; maximum is 60.
include_tool_callsNoOptional: include normalized tool_call events without raw tool output. Defaults to false.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses that the tool is a one-shot observation, returns only message events, tool calls are normalized without raw output, Forge support is limited, and message extraction supports specific agents. It does not mention side effects, rate limits, or authentication, but the core behavior is transparent.

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 extremely concise, consisting of three sentences that front-load the essential purpose and limitations. Every sentence adds value without repetition or fluff.

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 3 parameters and no output schema or annotations, the description covers the purpose, return content (message events, optional tool calls), limitations (Forge precision), and supported agents. It is sufficient for an agent to decide when to use this tool, though it omits return structure details that an output schema would provide.

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 schema already defines parameters (pids, peek_time_sec, include_tool_calls) with clear descriptions. The tool description adds overall context but does not enhance parameter semantics beyond what the schema provides. A score of 3 is appropriate as the schema carries the primary burden.

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 it is a 'one-shot short observation window for running child agents' that returns 'natural-language message events' and optionally 'normalized tool_call events', distinguishing it from a history API, gapless streaming, and stdout/stderr tailing. The verb 'peek' accurately reflects a quick, limited observation, and the tool's scope is specific and well-defined.

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 explicitly tells when not to use this tool (not for history, streaming, or stdout/stderr) and notes limitations like Forge tool calls being low-precision and excluding raw output. However, it does not directly reference sibling tools or provide explicit guidance on which alternative to use for specific needs, such as 'get_result' for full output.

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/mkXultra/ai-cli-mcp'

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