Skip to main content
Glama

docker_db

Destructive

Query database containers or check their status: version, size, uptime. Works with PostgreSQL, MySQL/MariaDB, Redis, MongoDB, and SQLite; destructive statements require explicit confirmation.

Instructions

query runs a statement against a database container, status asks the database about itself — version, size, uptime. PostgreSQL, MySQL/MariaDB, Redis, MongoDB and SQLite are spoken to through the client the image carries. A database that refuses answers with its exit code, not with a failed call. A statement that destroys data needs # CONFIRMED-DESTRUCTIVE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNoDatabase user. Default: the one the container was started with.
queryNoStatement in the language of this database — SQL, a Redis command, a MongoDB expression. Required by action query, unused by status. A statement that destroys a database or a whole keyspace is refused until it carries # CONFIRMED-DESTRUCTIVE.
actionYesquery runs a statement and brings back what the client printed. status asks the database about itself: version, size, uptime, and whether it answers at all.
formatNoHow the client lays out rows. Default: table. Only PostgreSQL has a CSV flag.table
profileNoWhich Docker host, by profile name. Default: the profile marked as default.
projectNoWhich compose project. Default: the project of the working directory. A name matching nothing is an error, not a fall back to every container on the host.
serviceYesDatabase service name as written in the compose file.
databaseNoDatabase name. Default: the one the container was started with.
compose_pathNoWhere the compose file is: the file itself, or the directory holding it. Needed only when no container of the host carries the project label — a project that was never brought up there. A directory holding several compose files is refused with their names rather than guessed through.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo
queryNo
actionNo
engineNo
healthNo
legendNoWhat the words in this answer mean. A key names the field before the value — "state=running", "containers[].health=unhealthy" — and only the values this answer used are listed.
memoryNo
outputNo
reasonNo
stderrNo
uptimeNo
detailsNo
messageNo
projectNo
serviceNo
versionNo
warningsNo
exit_codeNo
connectionsNo
clipped_bytesNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.1

TDQS

A3.8/5.0
Behavior4/5

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

The annotations already signal destructiveHint=true, and the description adds meaningful behavioral context: destructive statements require # CONFIRMED-DESTRUCTIVE, databases that refuse return their exit code instead of a failed call, and the client comes from the image. This does not contradict the annotations and helps the agent anticipate failure modes and safety gates.

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 short, front-loaded with the core query/status distinction, and every sentence earns its place. It avoids restating schema details and packs essential behavioral facts into four efficient sentences.

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?

Given the complex 9-parameter schema and the presence of an output schema, the description covers the most decision-relevant aspects: what the tool does, supported engines, destructive-statement handling, and error semantics. It leaves profile/project/compose_path selection behavior to the already-rich schema, which is acceptable.

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?

Schema description coverage is 100%, so the parameters are already well documented in the schema. The description adds value by clarifying the query/status behavior and the destructive-confirmation convention, but it does not provide additional parameter-level meaning beyond what the schema already states.

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 description states specific verbs and objects: 'query runs a statement against a database container' and 'status asks the database about itself'. It also names the supported database types, giving a clear resource scope. It does not explicitly differentiate this tool from sibling tools such as docker_db_admin, so it stops short of a 5.

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?

The description gives clear context for choosing between the query and status actions, and notes the destructive-confirmation requirement. However, it does not say when to prefer this tool over alternatives like docker_exec or docker_db_admin, nor does it state exclusions or prerequisites such as needing a running container. The guidance is implicit rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/hypnosis/docker-mcp-server'

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