Skip to main content
Glama

ct_psql

Run SQL inside a container with psql, using dry-run and confirmation to plan changes, or bypass with confirm flag. Optionally create an undo snapshot before executing mutations.

Instructions

Run SQL via psql inside a container (as the db OS user). MUTATION-CAPABLE.

Dry-run by default: without confirm=True you get a PLAN — the SQL plus a heuristic read/DML/DDL classification (advisory only) — recorded to the ledger. Re-call with confirm=True to execute.

snapshot=True (UNDO): take an auto-undo snapshot first and WAIT for it; if it can't be made the SQL is NOT run (fail-closed). On success the result carries an undo_point (revert via pve_rollback).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbNopostgres
sqlYes
ctidYes
confirmNo
snapshotNo
proximo_targetNoWhich configured Proxmox target to run this call against — a target name from your multi-target config (a specific PVE/PBS/PMG/PDM box). Omit to use the single/default target from the environment; the selection applies only to this call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: mutation capability, dry-run default, confirm requirement, snapshot for undo, fail-closed on snapshot failure, and the return of an undo_point. This is thorough.

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

Conciseness4/5

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

The description is concise at three paragraphs, with the purpose front-loaded. It includes necessary details without unnecessary verbosity, though it could be slightly tighter.

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 presence of an output schema and the tool's complexity (6 parameters), the description covers key behaviors: mutation, dry-run, undo, and fail-closed. It mentions ledger recording and undo_point, which is sufficient for an agent to use the tool safely.

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 only 17% (only proximo_target has a description). The description adds meaning for confirm (dry-run vs execution) and snapshot (undo snapshot), but does not explain the 'db', 'sql', or 'ctid' parameters in detail. Partial compensation for low coverage.

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 'Run SQL' and the resource 'via psql inside a container (as the db OS user)'. It differentiates from sibling tools like ct_exec and ct_diagnose by focusing on SQL execution.

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

Usage Guidelines4/5

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

The description explains the dry-run default behavior, the need for confirm=True to execute, and the snapshot=True option for undo snapshots. It provides clear context for when to use these features, though it doesn't explicitly compare with alternatives for non-SQL operations.

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/john-broadway/proximo'

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