Skip to main content
Glama

Run a command as a managed, log-captured execution

execution_run

Run a command as a subprocess with automatic log correlation ID injection, capturing stdout/stderr as logs for debugging scripts and test runs.

Instructions

Spawns command as a subprocess with LOG_PROBE_URL/LOG_PROBE_EXECUTION_ID/LOG_PROBE_SESSION_ID auto-injected into its environment, so any instrumentation you've added can POST straight to the ingestion server without you wiring the correlation IDs by hand. Stdout/stderr are also captured line-by-line as logs (stderr as level=error), merged with any HTTP-posted structured logs in execution_get_logs. Waits for the process to exit (or timeoutMs to elapse). Requires probe_server_start to have been called first. Best for scripts, one-off repros, and test runs (e.g. running a flaky test N times); for long-running services, use execution_create instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
envNoAdditional env vars, merged over the inherited environment.
argsNo
labelNo
commandYesExecutable to run, e.g. "npm" or "node".
sessionIdYes
timeoutMsNoDefault 120000 (2 minutes).
Behavior5/5

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

With no annotations provided, the description carries full burden and thoroughly discloses behavior: auto-injection of LOG_PROBE_* environment variables, line-by-line stdout/stderr capture with stderr as level=error, merging with HTTP-posted logs, waiting for exit or timeout, and the requirement of prior probe_server_start. No contradictions exist.

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?

Every sentence delivers distinct value: the first explains the core subprocess launch and environment injection, the second covers log capture, the third describes waiting behavior, the fourth states the prerequisite, and the fifth gives usage guidance. No filler or redundancy.

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 the primary behavior, preconditions, log capture, and alternative tools, but it omits what the tool returns (exit status? run ID?) and does not explain the role of the required sessionId parameter. Since no output schema exists, this gap slightly reduces completeness.

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 only 43% (3 of 7 params), and the description does not compensate for the missing semantics. It mentions command and timeoutMs but adds little beyond the schema, and it ignores sessionId, cwd, args, and label entirely, leaving agents to infer their meaning.

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 action: spawns `command` as a subprocess with environment variables injected, captures stdout/stderr as logs, and waits for exit. It also distinguishes itself from execution_create by recommending the latter for long-running services.

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?

Explicitly states when to use this tool: 'Best for scripts, one-off repros, and test runs' and identifies the alternative for long-running services. Also mentions the prerequisite that probe_server_start must have been called first.

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/asynchroza/log-probe-mcp'

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