Skip to main content
Glama
hifishhe

Synology Docker MCP Server

by hifishhe

synology_project_list

List all Docker Compose projects located in the Synology NAS docker directory, enabling quick overview of deployed stacks for management via SSH.

Instructions

List docker-compose projects in the Synology NAS docker directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for synology_project_list tool. Lists docker-compose projects by searching for docker-compose.yml files (maxdepth 2) under NAS_DOCKER_DIR via SSH, then returns the project folder names.
    else if (name === "synology_project_list") {
      const res = await execSshCommand(`find ${shQuote(NAS_DOCKER_DIR)} -maxdepth 2 -name "docker-compose.yml" -exec dirname {} \\;`);
      if (res.code !== 0) {
        return { content: [{ type: "text", text: `Failed to search projects: ${res.stderr}` }] };
      }
      const dirs = res.stdout.trim().split("\n").filter(Boolean);
      const projects = dirs.map((dir) => dir.replace(`${NAS_DOCKER_DIR}/`, ""));
      return { content: [{ type: "text", text: projects.length > 0 ? `Found projects:\n${projects.join("\n")}\n\nBase directory: ${NAS_DOCKER_DIR}` : `No projects found in ${NAS_DOCKER_DIR}` }] };
    }
  • Tool registration/schema for synology_project_list. No input parameters required; simply lists projects.
      name: "synology_project_list",
      description: "List docker-compose projects in the Synology NAS docker directory",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:111-191 (registration)
    Tool registration in the ListToolsRequestSchema handler where synology_project_list is declared along with other tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: "synology_docker_ps",
            description: "List all docker containers on the Synology NAS",
            inputSchema: {
              type: "object",
              properties: {},
            },
          },
          {
            name: "synology_docker_logs",
            description: "Get logs for a specific docker container",
            inputSchema: {
              type: "object",
              properties: {
                container_name: { type: "string", description: "Name or ID of the container" },
                tail: { type: "number", description: "Number of lines to show from the end of the logs", default: 100 },
              },
              required: ["container_name"],
            },
          },
          {
            name: "synology_docker_manage",
            description: "Manage container lifecycle (start, stop, restart)",
            inputSchema: {
              type: "object",
              properties: {
                action: { type: "string", enum: ["start", "stop", "restart", "rm"], description: "Action to perform" },
                container_name: { type: "string", description: "Name or ID of the container" },
              },
              required: ["action", "container_name"],
            },
          },
          {
            name: "synology_project_list",
            description: "List docker-compose projects in the Synology NAS docker directory",
            inputSchema: {
              type: "object",
              properties: {},
            },
          },
          {
            name: "synology_project_manage",
            description: "Manage a docker-compose project (up, down, restart)",
            inputSchema: {
              type: "object",
              properties: {
                project_name: { type: "string", description: "Name of the project folder in NAS_DOCKER_DIR" },
                action: { type: "string", enum: ["up -d", "down", "restart", "pull"], description: "Docker compose action" },
              },
              required: ["project_name", "action"],
            },
          },
          {
            name: "synology_read_file",
            description: `Read a configuration file from the NAS (restricted to ${NAS_DOCKER_DIR})`,
            inputSchema: {
              type: "object",
              properties: {
                filepath: { type: "string", description: `Absolute path to the file on the NAS (must be within ${NAS_DOCKER_DIR})` },
              },
              required: ["filepath"],
            },
          },
          {
            name: "synology_write_file",
            description: `Write or update a configuration file on the NAS (restricted to ${NAS_DOCKER_DIR})`,
            inputSchema: {
              type: "object",
              properties: {
                filepath: { type: "string", description: `Absolute path to the file on the NAS (must be within ${NAS_DOCKER_DIR})` },
                content: { type: "string", description: "File content to write" },
              },
              required: ["filepath", "content"],
            },
          },
        ],
      };
    });
  • Helper used to safely quote shell arguments when building SSH commands, including the find command in synology_project_list.
    function shQuote(s: string): string {
      return "'" + s.replace(/'/g, "'\\''") + "'";
    }
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. It only states the basic function without disclosing behavioral traits such as authentication needs, rate limits, or whether it is a read-only operation. The description does not contradict annotations as there are none.

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 a single concise sentence with no unnecessary words. It is front-loaded and efficiently conveys the function.

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?

Given no output schema, the description should explain what the output contains (e.g., project names, details). It does not, leaving ambiguity about the return value. The tool is simple, but the description is incomplete in this regard.

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?

No parameters exist in the schema, and schema coverage is 100%. The description does not need to add parameter information. Baseline for 0 parameters is 4.

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 clearly states the verb 'list' and the resource 'docker-compose projects', and specifies the location 'in the Synology NAS docker directory'. It distinguishes itself from sibling tools like synology_docker_ps (which lists containers) and synology_project_manage (which manages projects).

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives, no prerequisites or conditions mentioned. The description only states what it does without any usage context.

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/hifishhe/Synology-Docker-MCP'

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