Skip to main content
Glama

compose_add_service

Add a new service definition to an existing Docker Compose file by specifying image, ports, dependencies, and API key. Configure services without manually editing YAML.

Instructions

Add a new service definition to an existing Docker Compose file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesDocker image for the service
portsNoPort mappings (e.g. ['8080:80'])
api_keyNoAPI key for authentication
depends_onNoService dependencies
service_nameYesName of the service to add
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the operation itself; it does not disclose what happens if the service already exists, whether existing YAML content/formatting/comments are preserved, how the tool locates the compose file (notably, no file path parameter exists in the schema), or any side effects. For a mutation tool with zero annotation coverage, this is a significant gap.

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?

A single sentence with zero filler; the action verb and resource are front-loaded, with the scope qualifier ('to an existing...') placed immediately after. It reads efficiently, though the brevity partly reflects under-specification rather than deliberate pruning of already-conveyed detail.

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

Completeness2/5

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

This is a mutating tool on a file resource, with no annotations, no output schema, and no description of return behavior. Crucially, the schema contains no pointer to which compose file is modified, yet the description does not explain how the target file is identified or selected. Conflict/duplicate-service behavior and file-preservation guarantees are also absent, leaving an agent with real unanswered questions before invoking it.

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% — all five parameters (image, ports, api_key, depends_on, service_name) carry descriptions in the input schema. The tool description adds no parameter-level information, but per the baseline rule, 100% schema coverage means the schema does the heavy lifting and a 3 is appropriate.

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 uses a specific verb ('Add'), a clear resource ('a new service definition'), and a precise scope ('to an existing Docker Compose file'). The word 'existing' cleanly separates it from siblings like compose_generate and compose_optimize, telling the agent this is a mutation of an already-present file, not creation or optimization.

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?

The phrase 'to an existing Docker Compose file' supplies clear contextual guidance: this tool is for extending an already-created compose file, which implicitly rules out scenarios where no file exists (those would route to compose_generate). However, it stops short of explicitly naming alternatives or stating when-not-to-use conditions, which would earn a 5.

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

Install Server

Other Tools

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/barnburner121/claude-plugin-marketplace'

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