Skip to main content
Glama
falkenslab
by falkenslab

Run a command in a lab

lab_exec

Runs a command inside a running lab service and returns its exit code and output; use it to inspect or modify lab containers, confirming changes first.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labYesThe lab's name, as list_labs gives it
commandYes
serviceYesOne of the lab's services, as lab_status gives them
timeoutSecondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputYes
exitCodeYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false but leave the agent with no sense of consequence; the description supplies that by warning the command "can change the lab" and requiring user confirmation for non-read commands. It also discloses the return shape (exit code and output). It does not cover timeout behavior, permissions, or side-effect scope, so it stops 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.

Conciseness5/5

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

Three short sentences with no filler: what it does and returns, how to pass the command, and the caution. The caution and the critical usage rule are front-loaded rather than buried.

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-value detail is optional, yet the description still summarizes it; the mutation warning and command format cover the main risks of an exec tool. The only real omissions are timeoutSeconds semantics and any note on environment/working-directory context or failure modes.

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 50%: lab and service are documented in-schema, while command and timeoutSeconds are not. The description compensates well for command by specifying it is an argv list and showing the shell-line form, but says nothing about timeoutSeconds, leaving one of four parameters undocumented everywhere.

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?

Names a specific verb and resource ("Run a command") and scopes it precisely to "one of a running lab's services," which separates it from the container-level siblings exec_in_container and compose_exec. It does not name those siblings explicitly, but the lab-scoped framing is enough for an agent to route correctly.

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?

Gives concrete invocation guidance (command is a list; use ["sh", "-c", "…"] for a shell line) and a clear conditional rule for the risky case: confirm with the person first unless the command only reads. No exclusions or explicit alternative tool are named, but the when-to-be-careful guidance is unusually actionable.

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