Skip to main content
Glama

compose_stop

Stop services in a Docker Compose project without removing containers, networks, or volumes. Keeps resources intact for later restart with compose_start.

Instructions

Stop services in a compose project without removing their containers.

Unlike compose_down, containers/networks/volumes survive - use compose_start to bring them back. Does not raise on a non-zero CLI exit (a missing compose plugin or a timeout still raises) - inspect returncode/stderr in the result.

Args: project_dir: Dir with the compose file (default: server cwd; copied to the target host if no local plugin) files: Explicit compose file paths (repeatable, -f) project_name: Compose project name override services: Specific services to stop (default: all) stop_timeout_seconds: Grace period before SIGKILL (passed as --timeout) timeout_seconds: Subprocess timeout (default 300s)

Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
servicesNo
project_dirNo
project_nameNo
timeout_secondsNo
stop_timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.0

TDQS

A5/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and destructiveHint=false. The description adds meaningful behavioral context beyond these: it clarifies that state persists (containers/networks/volumes survive), explains that non-zero CLI exits do NOT raise except for missing plugin/timeouts, and warns that project_dir may be copied to the target host. This contextual detail is valuable and consistent with annotations; no contradiction.

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 tightly written and well-organized. It starts with a one-sentence purpose, immediately contrasts with siblings, then lists parameters and return value. Every element contributes essential information with no fluff or redundant phrasing. The structure front-loads the most critical decision points (what survives, error handling) before details.

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

Completeness5/5

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

Given the tool's moderate complexity (six parameters, non-standard exit handling), the description covers everything needed for correct invocation: purpose, persistence semantics, error behavior, parameter meanings, and the exact return dictionary format. The sibling set is large, but the description clearly distinguishes this tool from the most similar alternatives (compose_down, compose_start). No missing information is apparent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides a full list of all six parameters with clear, human-readable explanations and defaults where applicable (e.g., 'default: server cwd', 'default: all', 'default 300s'). The schema itself has zero property descriptions (0% coverage), so the description completely compensates, leaving no parameter underdocumented.

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 opens with 'Stop services in a compose project without removing their containers' – a specific verb, resource, and clear scope. It immediately differentiates from the sibling compose_down by stating what is NOT removed, and explicitly names compose_start as the reverse operation. This leaves no ambiguity about the tool's function.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives: 'Unlike compose_down, containers/networks/volumes survive - use compose_start to bring them back.' It also explains the non-zero exit behavior and the copying of project_dir when no local plugin exists, giving the agent concrete conditions for invocation.

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

Deploy Server

Other Tools