Skip to main content
Glama

docker_compose

Read-only

Read a project's declared Compose configuration and environment variables directly from files, showing each variable's origin and masking secrets.

Instructions

Reads what the project declares: config for the resolved compose file, env for the variables with the file each came from. Both read files rather than a running process — a variable here is what was written down, not what the container now holds. What is actually running is docker_container.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maskNoHide values whose key names a secret. Default: true.
actionYesconfig: the compose configuration, as fields and as the file itself. env: the variables the project declares, each naming the file it came from.
profileNoWhich Docker host, by profile name. Default: the profile marked as default.
projectNoWhich compose project. Default: the project of the working directory. A name matching nothing is an error, not a fall back to every container on the host.
resolveNoSubstitute variables the way Docker does before starting anything, which is what turns declared ports into published ones. Costs a call to docker compose. Default: false.
serviceNoService name as written in the compose file. Narrows the answer to this one service.
compose_pathNoWhere the compose file is: the file itself, or the directory holding it. Needed only when no container of the host carries the project label — a project that was never brought up there. A directory holding several compose files is refused with their names rather than guessed through.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
actionNo
legendNoWhat the words in this answer mean. A key names the field before the value — "state=running", "containers[].health=unhealthy" — and only the values this answer used are listed.
reasonNo
projectNo
serviceNo
volumesNo
networksNo
resolvedNo
servicesNo
variablesNo
compose_fileNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the tool readOnlyHint=true, and the description adds meaningful behavioral context: it reads files, not a running process, and values reflect declared state rather than current container state. This clarifies the tool's semantics beyond the structured hint without contradicting it.

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 tightly written sentences, front-loaded with the core purpose and then the key distinction from the runtime tool. Every sentence earns its place with no filler or restatement of schema details.

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?

Given a rich 7-parameter schema, complete schema descriptions, an output schema, and read-only annotations, the description covers the essential conceptual gap: declared config vs actual running state. It could have explicitly referenced the resolve-cost or project-label edge cases, but those are already handled in the schema.

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 100%, so every parameter is already documented. The description mostly mirrors the schema's action enum wording ('config', 'env') rather than adding new parameter-level meaning. It earns the baseline score for not undermining the schema, but adds little beyond it.

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?

Description opens with a specific verb and resource: 'Reads what the project declares', then names the two actions (config, env) and explicitly distinguishes itself from docker_container. An agent can tell exactly what this tool accesses and how it differs from related tools.

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?

It clearly frames the tool as the read-only declarative view of a compose project and points to docker_container for what is actually running. It gives useful context for when to pick this over the runtime-oriented sibling, though it does not enumerate exclusions for every sibling like docker_compose_control.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hypnosis/docker-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server