Skip to main content
Glama

execute_local_command

Executes shell commands locally and returns stdout, stderr, and exit code, providing a direct way to inspect and automate system tasks.

Instructions

[DISABLED - set LNMCP_ENABLE_EXEC=1 to enable] Execute a shell command on the local machine. Returns stdout, stderr, and exit code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for command execution (optional)
envNoAdditional environment variables (optional)
shellNoUse shell interpretation (default: true)
commandYesShell command to execute
timeoutNoCommand timeout in seconds (default: 30)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior3/5

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

The description discloses return values (stdout, stderr, exit code) and the disabled-by-default state, which helps an agent predict outcomes. Missing, however, is a warning about the potentially destructive nature of arbitrary local shell commands, which is especially important with no annotations to fall back on.

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?

Two sentences, front-loaded with the most critical operational constraint, and no filler. The output information and disabled-state notice are both essential and economically stated.

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

Completeness3/5

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

It covers the essential output contract and availability state, and sibling context makes the local-vs-remote distinction evident. It lacks enough guidance on risk, when to choose alternatives, and edge-case behavior for a tool with 5 parameters and no output schema, leaving it merely adequate rather than comprehensive.

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%, and each parameter already has a meaningful description, including defaults for shell and timeout. The tool description adds no paramter detail, which is fine because the schema already carries that burden, so the baseline of 3 applies.

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 executes a shell command on the local machine, using a specific verb and resource. The 'local machine' qualifier distinguishes it from remote execution tools like ssh_execute, and the disabled-state notice adds immediate clarity about availability.

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 disabled notice gives an explicit precondition for use (set LNMCP_ENABLE_EXEC=1), and 'local machine' signals when it applies versus remote alternatives. However, it does not explicitly name an alternative tool for remote execution, so the guidance is clear but not fully explicit.

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