Skip to main content
Glama

RunServiceCommand

Destructive

Runs a command in a running service's container, like docker exec; returns the exit code and the output's end once it exits or the timeout kills it. Over a bound on command, stdin or timeout = refused (named). Cannot start = exit 127 or 126, Docker's error in stdout. Untrusted output.

Input Schema

NameRequiredDescriptionDefault
stdinNoWritten to stdin, then closed.
commandNoE.g. ["psql", "-c", "select 1"]; a shell line: ["sh", "-c", "ls | head"].
serviceNo
project_idNo
run_as_userNoEmpty = the container's. "root" can install packages.
timeout_secondsNo0 = default. Kills the main process only. Over ~50 may outlast your client: background long jobs.
working_directoryNoEmpty = the container's.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations (destructive/openWorld/idempotent=false) by disclosing return shape (exit code plus only the tail of output), truncation behavior, that over-bound command/stdin/timeout is refused with the offending parameter named, that failure to start surfaces as exit 127/126 with Docker's error in stdout, and that output is untrusted.

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?

Purpose and return contract are front-loaded in the first clause, and every later sentence carries real operational information. The telegraphic fragments ('Over a bound on command, stdin or timeout = refused (named)') cost some readability but nothing is wasted.

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?

For a destructive, open-world exec tool with no output schema, the description covers return values, truncation, refusal and failure modes plus a security caveat. It stops short of stating permission/auth requirements or environment restrictions, which are the remaining 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 71% and the schema already documents stdin, command, run_as_user, timeout_seconds and working_directory. The description adds the useful refusal semantics tied to the command/stdin/timeout bounds, but service and project_id remain undocumented and no syntax detail is added 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?

States a specific verb and resource ('Runs a command in a running service's container') and anchors it to a familiar analogue ('like `docker exec`'), which immediately separates it from siblings such as RunMachineAction, RunProjectAction and QueryContainerLogs.

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?

Usage is implied by the docker-exec analogy, and refusal conditions are given, but the description never states when to choose this over the sibling action/log tools or any prerequisites for calling it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources