Skip to main content
Glama
hifishhe

Synology Docker MCP Server

by hifishhe

synology_docker_ps

Retrieve a list of all running Docker containers on your Synology NAS to monitor and manage container status.

Instructions

List all docker containers on the Synology NAS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:114-121 (registration)
    Tool 'synology_docker_ps' registered in ListToolsRequestSchema handler with name, description, and empty inputSchema.
    {
      name: "synology_docker_ps",
      description: "List all docker containers on the Synology NAS",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Handler for 'synology_docker_ps' tool: executes 'docker ps -a' via SSH and returns formatted output with container ID, names, status, ports, and image.
    if (name === "synology_docker_ps") {
      const res = await execSshCommand(`docker ps -a --format "table {{.ID}}\\t{{.Names}}\\t{{.Status}}\\t{{.Ports}}\\t{{.Image}}"`);
      return { content: [{ type: "text", text: res.stdout || res.stderr }] };
    }
  • Input schema for synology_docker_ps: empty object (no parameters required).
    inputSchema: {
      type: "object",
      properties: {},
    },
  • execSshCommand helper function used by the handler to run SSH commands on the Synology NAS via sudo.
    async function execSshCommand(command: string): Promise<{ stdout: string; stderr: string; code: number }> {
      return new Promise((resolve, reject) => {
        const conn = new Client();
        conn.on("ready", () => {
          // Use printf to avoid shell expansion of password contents.
          const fullCommand = `export PATH=$PATH:/usr/local/bin:/opt/bin:/bin:/usr/bin && printf '%s\\n' ${shQuote(NAS_PASSWORD!)} | sudo -S sh -c ${shQuote(command)}`;
          conn.exec(fullCommand, (err, stream) => {
            if (err) {
              conn.end();
              return reject(err);
            }
    
            let stdout = "";
            let stderr = "";
    
            stream
              .on("close", (code: number) => {
                conn.end();
                resolve({ stdout, stderr, code });
              })
              .on("data", (data: any) => {
                stdout += data;
              })
              .stderr.on("data", (data: any) => {
                stderr += data;
              });
          });
        }).on("error", (err) => {
          reject(err);
        }).connect({
          host: NAS_HOST,
          port: NAS_PORT,
          username: NAS_USER,
          password: NAS_PASSWORD,
          readyTimeout: 30000,
        });
      });
    }
Behavior3/5

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

With no annotations, the description carries the full burden, but it is minimal. It states a simple read-only listing without side effects, which is sufficient. However, it could mention that it is non-destructive or describe the output format. It meets the minimum for a straightforward tool.

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?

A single, clear sentence that front-loads the core purpose. No unnecessary words, perfectly concise for the tool's simplicity.

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 listing tool with no parameters and no output schema, the description is adequate but not complete. It does not mention what information is returned (e.g., container names, statuses), which could be helpful for an agent. However, it is not severely lacking given the tool's trivial nature.

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?

The input schema has no parameters, so schema coverage is 100% by default. The description does not need to add parameter meaning. According to guidelines, 0 parameters yields a baseline score of 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 action (list), the resource (docker containers), and the context (on Synology NAS). It effectively distinguishes from sibling tools like synology_docker_logs and synology_docker_manage, which handle different operations.

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?

The description provides no guidance on when to use this tool versus its siblings. There is no mention of alternatives or context that would help an agent decide between this and other docker-related tools.

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