Skip to main content
Glama

exec

Run shell commands inside a service’s running container with its environment and return the output, so you can inspect or troubleshoot live services from an AI agent.

Instructions

Run a shell command inside a service's running container (with its env) and return the output.

Input Schema

NameRequiredDescriptionDefault
commandYesShell command
serviceYesService id or `project.service`, e.g. `shop.api`
timeout_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/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 disclosing behavioral traits. It mentions only that the command runs 'with its env' and returns output, but says nothing about security implications, required permissions, side effects, whether the command runs as root, how failures or timeouts behave, or whether it blocks. For an arbitrary shell-execution tool, these omissions are significant.

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 a single, front-loaded sentence with no wasted words. It conveys purpose, execution context, and return behavior efficiently.

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

Completeness2/5

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

For a high-risk arbitrary-command-execution tool with no annotations and no output schema, the description is incomplete. It does not explain timeout behavior, what happens if the service is not running, permission requirements, or whether the command is run interactively or non-interactively. These gaps leave an agent without enough context to invoke the tool safely and correctly.

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 67%: 'command' and 'service' are documented in the schema, while 'timeout_s' has only a default value. The description reinforces the meaning of 'service' and 'command' but adds nothing for 'timeout_s' or richer argument syntax. A baseline 3 is appropriate given the moderate schema coverage.

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 uses a specific verb ('Run') and resource ('a shell command') and scopes it precisely to 'inside a service's running container (with its env)', including the return behavior. This clearly distinguishes it from siblings like restart, get_logs, or list_services.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives such as get_logs or restart. The description states what it does but does not mention prerequisites (e.g., service must be running), exclusions, or the conditions under which an agent should choose exec over other diagnostic or management tools.

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