Skip to main content
Glama

Docker Compose Create

docker_compose_create

Register a Docker Compose project on an fnOS NAS by specifying its project name and the folder containing the compose file; enable auto_build to start containers.

Instructions

登记 Docker Compose 项目(写操作;composeCreate 端点)。

请求体真实结构(源自 fnOS 前端逆向):{"auto_build": false, "file": "docker-compose.yaml", "folder": "/vol1/1000/xxx", "project_name": "xxx"}。compose 内容不在请求里——必须先用 file_write_text/file_upload 把 yaml 文件写入 folder,再调本工具。

典型流程:1) file_write_text 写 compose 文件;2) 本工具登记项目; 3) docker_compose_build(project_name) 真正拉起容器(compose up -d); 4) docker_compose_containers(project_name) 验证。auto_build=true 可合并第 2/3 步。

注意:folder 的父目录若自身已带 compose 文件(如 /vol1/1000/docker 自带 docker-compose.yml),fnOS 会判定其为 compose 项目,嵌套创建 返回 errno 0x03200107(父级目录已存在项目),应换干净父目录; 0x03200102 表示 folder 下找不到 compose 文件。

Input Schema

NameRequiredDescriptionDefault
fileNocompose 文件名,默认 docker-compose.yamldocker-compose.yaml
hostNoNAS 主机地址(IP 或域名)
portNoNAS 端口,如 5667(HTTPS)/5666(HTTP)/443
folderYescompose 文件所在 NAS 目录,如 /vol1/1000/myapp;必须是干净的父目录,父目录自身不能已是一个 compose 项目
schemeNo传输协议
profileNo独立 session profile 名称,默认使用 default
auto_buildNo登记后自动执行 compose up -d(false 时仅登记,需手动 docker_compose_build)
project_nameYes项目名,如 mcp-probe(compose ls 中显示的名称)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it flags the operation as a write, explains that Compose content is NOT in the request body (a non-obvious behavior), and documents two specific errno codes (0x03200107 parent-already-a-project, 0x03200102 missing compose file) with remediation. This is exactly the kind of context annotations would otherwise provide.

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?

Front-loads the verb+resource, then layers prerequisite, workflow, and error handling in a scannable structure. It is dense and long, but each block (request body, workflow, error codes) carries distinct value, so little is wasted.

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?

For an 8-parameter mutation tool with an output schema and no annotations, the description covers the prerequisites, the end-to-end workflow, the auto_build behavior, and the failure modes an agent will hit. Nothing essential for correct invocation is missing.

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 100%, so baseline is 3, but the description adds genuine meaning by revealing the real request-body structure ({"auto_build", "file", "folder", "project_name"}) and the constraint that folder must be a clean parent directory. It stops short of explaining host/port/scheme/profile, which the schema already covers.

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 ('登记 Docker Compose 项目' / register a Compose project) and explicitly distinguishes itself from the sibling tools that follow it in the workflow (docker_compose_build, docker_compose_containers). An agent can identify this as the registration step without opening the schema.

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?

Gives an explicit prerequisite (the yaml must already be written via file_write_text/file_upload before calling), a numbered typical workflow, and names the alternative steps that this tool does not perform. It also states auto_build=true can merge steps, so when/when-not is fully covered.

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