Skip to main content
Glama
hifishhe

Synology Docker MCP Server

by hifishhe

synology_docker_manage

Manage Docker container lifecycle on Synology NAS: start, stop, restart, or remove containers via SSH with auto-privilege escalation.

Instructions

Manage container lifecycle (start, stop, restart)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform
container_nameYesName or ID of the container

Implementation Reference

  • Handler for synology_docker_manage tool: validates action and container name, then executes docker start/stop/restart/rm via SSH.
    else if (name === "synology_docker_manage") {
      const { action, container_name } = args as { action: string; container_name: string };
      if (!VALID_DOCKER_ACTIONS.has(action)) {
        throw new Error(`Invalid action: ${action}`);
      }
      validateContainerName(container_name);
      const res = await execSshCommand(`docker ${action} ${shQuote(container_name)}`);
      return { content: [{ type: "text", text: `Command 'docker ${action} ${container_name}' executed.\nExit Code: ${res.code}\nOutput:\n${res.stdout || res.stderr}` }] };
  • Input schema for synology_docker_manage tool: action (enum) and container_name (string), both required.
    {
      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"],
      },
    },
  • src/index.ts:135-135 (registration)
    Tool is registered in the ListToolsRequestSchema handler as part of the tools array.
    name: "synology_docker_manage",
  • Helper function that validates container names (alphanumeric, underscore, dot, hyphen) used by the handler.
    function validateContainerName(name: string): void {
      if (!/^[a-zA-Z0-9][a-zA-Z0-9_.\-]*$/.test(name)) {
        throw new Error(`Invalid container name: ${name}`);
      }
  • Shell-quoting helper used by the handler to safely interpolate container names into SSH commands.
    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 present, and the description does not disclose behavioral traits such as destructive actions (e.g., container removal) or required permissions. The description offers no additional detail beyond the basic action list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (one sentence) but incomplete because it omits the 'rm' action. Conciseness is not helpful if it sacrifices accuracy.

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

Completeness3/5

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

For a simple tool with two fully described parameters, the description is minimally adequate. However, it lacks mention of return values, error conditions, and the omitted 'rm' action, so completeness is moderate.

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?

Input schema has 100% description coverage, so the schema defines parameter semantics sufficiently. The description adds no extra meaning beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states 'manage container lifecycle' and lists three actions, but the input schema includes a fourth action 'rm' not mentioned. This omission reduces clarity and completeness.

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 provided on when to use this tool versus siblings like synology_docker_logs or synology_docker_ps. Context about prerequisites or appropriate scenarios is absent.

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