Skip to main content
Glama

Run a command here and receive a digest of its output

local_llm_run

Run shell commands and get an AI-digested summary, so lengthy logs, test results, or listings become easy to interpret without reading raw output.

Instructions

Execute a shell command on this host (bash -c, this user's privileges, stdin closed) and have the local worker model digest the output for you. You receive the digest plus a trailer (turn id, artifact ref, exit code, raw size); the raw output is stored as an artifact you can slice with local_llm_artifact. Use this instead of your own shell tool whenever the command would print more than you need to read (logs, tests, builds, listings, git output, grep results); rule of thumb: anything over ~40 lines / 2 KB of output belongs here, while commands that print little or nothing run directly. Placeholders such as [SECRET-1] in the command are expanded server-side before execution and never appear in the result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for the command. Default: the server's own cwd.
taskNoWhat to report from the output. Default: outcome, every error/warning verbatim, key values.
commandYesThe shell command to run, e.g. 'journalctl -u nginx --since -1h' or 'pytest -q'.
verbatimNoCopy the matching output lines byte for byte instead of digesting (the worker only locates them). Only for text you must reproduce or edit (a function, a config block, an error with its stack). NOT for questions, counts, summaries or listings: those need the digest, which is the default.
timeout_sNoKill the command after this many seconds (0 = server default).
max_output_charsNoSoft budget for the digest (0 = server default).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

All four annotation hints are false, so the description carries the full behavioral burden — and it pays it in full: execution environment (bash -c, this user's privileges, stdin closed), return shape (digest plus a trailer with turn id, artifact ref, exit code, raw size), raw output persisted as a sliceable artifact, and server-side secret expansion where placeholders 'never appear in the result.' Nothing contradicts the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences with no filler, and the core action plus execution context are front-loaded before usage routing and the secret-handling caveat. It is on the longer side, but for a six-parameter tool with digest, artifact, and secret mechanics, each sentence carries distinct decision-relevant information, so the density is earned.

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?

This is a high-complexity tool (arbitrary shell execution with side-effect and security implications), and the description covers execution environment, alternative routing, return/artifact flow, and secret handling; an output schema exists to document return values. Minor gaps remain — no explicit statement about non-zero exit handling or how it relates to local_llm_delegate — though the trailer's exit-code field implies graceful handling.

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

Parameters4/5

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

Schema coverage is 100% with unusually strong per-parameter descriptions (verbatim even explains when not to use it), establishing a baseline of 3. The description adds one schema-absent semantic: placeholders such as [SECRET-1] in the command are expanded server-side and stripped from results, which meaningfully extends the command parameter's value space beyond the schema's examples.

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 opens with a precise action — 'Execute a shell command on this host (bash -c, this user's privileges, stdin closed) and have the local worker model digest the output for you' — naming the verb, resource, and the differentiating mechanism (digestion by the local worker model). It also explicitly references the sibling local_llm_artifact for the stored raw output, so an agent can distinguish this tool from the sibling set without opening any schema.

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 gives explicit routing: 'Use this instead of your own shell tool whenever the command would print more than you need to read', backed by a concrete rule of thumb ('anything over ~40 lines / 2 KB of output belongs here, while commands that print little or nothing run directly') and examples (logs, tests, builds, listings, git output, grep results). The verbatim parameter schema description adds a further exclusion ('NOT for questions, counts, summaries or listings'), making when-to-use versus when-not-to-use unambiguous.

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