Skip to main content
Glama

create-db-docker

Destructive

Provisions one lab database Docker instance for PostgreSQL, MySQL, SQL Server, or Oracle, with HA replicas, remote host setup, and dry-run planning.

Instructions

dbabrain common.cli create-db-docker: One lab database Docker instance to build. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • name (required): The instance's name: folder, compose project and container.

  • engine (required): postgres | mysql | mssql | oracle | oracle-xe.

  • version (required): The image tag, checked against the registry first.

  • mode: single (default) | ha-lab.

  • replicas: ha-lab only: standbys. Omitted = the engine's default.

  • host_port: The host port of the primary. Omitted = the engine's own.

  • password_ref: The secret REF the connection record names.

  • password: Its RESOLVED value. A dry run may omit it.

  • backup_mount: Host folder bind-mounted at the same path; empty = none. Omitted means nothing stated: no mount for an engine that needs none, and refused by name for one that mounts its backup folder (SQL Server) - the node's own is...

  • network_subnet: The compose network's /24. Omitted = derived from the name.

  • data_host_dir: PostgreSQL single only (0.37.0): keep the data in this host folder, bound at /var/lib/postgresql, instead of a Docker named volume - e.g. on a share. Absent: the named volume.

  • run_as: The uid:gid the container runs as (0.37.0) - for a host folder whose files only one uid can own, such as an NFS share that maps every user to one uid. Absent: the image's own user.

  • timezone: A single instance (0.40.0): the container's TZ - the clock its database reads its own time in. Absent: the image's own, UTC.

  • containers_dir (required): Where the instance folder is written on its host. Stated by the caller - the node's own is sre.docker_db.containers_dir - because the command reads no configuration and assumes no folder; a request without it is refus...

  • worker_host: The address recorded for an instance built on this machine.

  • remote: Build on this Ubuntu host over SSH. An ssh_login object: host, port (22), username, and a RESOLVED password or an absolute key_file path - never a ref; label names it in messages.

  • install_docker: With remote: install Docker and prepare the folders first. Never on a dry run.

  • sudo_password: With install_docker: sudo's password. Omitted = the SSH one.

  • health_timeout: How long to wait for health. Omitted = the engine's own ceiling.

  • force: Rebuild an existing instance - destroys its containers and volumes.

  • dry_run: Render the plan; connect to nothing, change nothing.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create-db-docker"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and openWorldHint=true, and the description adds substantial context beyond them: `force` destroys containers and volumes, `dry_run` connects to nothing, `remote` builds over SSH with a resolved password or key_file, `install_docker` prepares the host, and versions are checked against the registry first. The only weakness is the vague 'Changes or removes something' lead-in and a confirm/reason requirement that is asserted but not listed among the request fields.

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?

It is front-loaded correctly with a one-line purpose followed by the field catalog, and most entries are information-dense rather than padded. However the 'Changes or removes something / emergency-operations list' boilerplate is confusing for a create command, and two field entries are visibly truncated, which undercuts the otherwise efficient structure.

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

Completeness4/5

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

This is a complex, many-field mutation tool, and the description covers nearly every field's meaning, defaults and constraints. An output schema exists, so return values need not be explained, but the truncated entries and the unlisted confirm/reason requirement leave small gaps for an agent constructing a request.

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 0% and the schema is a single opaque `request` object with additionalProperties=true, so the description carries the full burden — and it does so with per-field semantics, defaults, enum values (engine, mode), and version notes for data_host_dir, run_as and timezone. Points are lost because `backup_mount` and `containers_dir` are truncated mid-sentence, and the mentioned `confirm`/`reason` do not appear in the field list at all.

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

Purpose4/5

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

The opening line states a specific verb and resource: 'One lab database Docker instance to build,' followed by the command path `create-db-docker`. An agent can tell this builds a Dockerized database instance rather than moving or inspecting one, though the very next sentence ('Changes or removes something') muddies the purpose by describing generic mutation rather than creation.

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

Usage Guidelines3/5

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

Usage is only implied through field-level notes such as `dry_run` ('Render the plan; connect to nothing, change nothing') and `force` ('Rebuild an existing instance'). There is no explicit statement of when to choose this tool over siblings like `move-db-docker` or `db-status`, and the mention of an 'emergency-operations list' taking `confirm`/`reason` is never tied to a field in the request.

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