Skip to main content
Glama
falkenslab
by falkenslab

Run a command in a Compose service

compose_exec

Run a command in a running service of a Compose project and capture its exit code and output. Use it to inspect or change containers; confirm writes first.

Instructions

Run a command in a running service of a Compose project, returning its exit code and output. The command is a list; for a shell line, ["sh", "-c", "…"]. Can change the service: confirm with the person first unless it only reads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoIts compose file, when it isn't the folder's compose.yaml
folderYesThe Compose project's folder (absolute path), where its compose.yaml is
commandYes
serviceYes
timeoutSecondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputYes
exitCodeYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already disclose readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the mutation profile is partly covered. The description adds meaningful context beyond them: the command can mutate the service and requires user confirmation. It does not mention the 60s default timeout or rate/output limits, keeping it short of a 5.

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?

Three tight sentences with the core action front-loaded and no filler. Slightly dense but every clause earns its place.

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?

An output schema exists, so return values ('exit code and output') need no elaboration, and annotations carry the safety profile. The confirmation caveat and command-format guidance round it out, though the undocumented timeout and project-file parameters leave minor gaps.

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 coverage is 40%, so the description must help. It clarifies the 'command' parameter well (array form, shell-line workaround ['sh','-c','…']), but leaves 'file', 'folder' and 'timeoutSeconds' entirely to the sparse schema, so the compensation is partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run a command in a running service of a Compose project') plus the return value (exit code and output). It implies a Compose-service scope distinct from container-level exec, but never names the sibling exec_in_container, so an agent must infer the differentiation.

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

Usage Guidelines3/5

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

Provides a conditional safety rule ('confirm with the person first unless it only reads'), which is useful when-to guidance. It does not state when to prefer this over exec_in_container or lab_exec, so the alternative-selection guidance is only implied.

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