Skip to content
sw-postgres-mcp
sw-postgres-mcp

Tools

Everything sw-postgres-mcp exposes to your AI client: tools, resources and prompts.

18 capabilities18 tool
Automated heuristic

Tool docs quality: C — 18 tools graded

Average 57/100 for how clearly each description tells an AI client what the tool does, what it needs, and what it changes. It is not a security audit.

  • Grade A: 0
  • Grade B: 3
  • Grade C: 11
  • Grade D: 4
  • Grade F: 0
How grades work
  • schemas/tables the agent may see via describeschema/query. If empty, all tables are readable. If tables is non-empty, only those fully-qualified tables are listed.

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • schemas/tables the agent may mutate. Defaults to deny: if both schemas and tables are empty, nothing is writable. Add entries explicitly.

    Description quality grade D, 40/100 · 4 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • explicit bearer token for the localhost approval UI, sent as Authorization: Bearer <token> or a ?token= query-string fallback. When omitted (the default), the server generates a random token per startup and prints it once on stderr alon

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • whether the localhost approval UI starts alongside the MCP server (default true). Overridable with SWAPPROVALSERVERENABLED ("true"/"false"). With it disabled, no plan can ever be approved, so any preview

    Description quality grade C, 55/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • port the localhost approval UI listens on, bound to 127.0.0.1 only (default 4319). Overridable with SWAPPROVALSERVERPORT.

    Description quality grade C, 55/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • whether the localhost approval UI requires its per-session bearer token on every route, including the read-only GET ones (default true). Loopback binding plus the Host/Origin/Sec-Fetch-Site provenance checks stop a hostile browser page; t

    Description quality grade C, 65/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Marked read-only.

    • Gives usage guidance: passed10/10

      Includes when or how to use it.

  • identity recorded as callerid on every audit log row (default "unknown"). Overridable with SWCALLERID. See Audit log.

    Description quality grade C, 55/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • two-phase delete. Runs the statement inside a transaction, returns the exact affected row count plus a sample of affected rows, then rolls back. The response includes a plantoken, the exact statement, and params — and a status

    Description quality grade C, 60/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • tables, columns with types, foreign keys, row-count estimates (respects read allowlist).

    Description quality grade C, 55/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: passed15/15

      Looks read-only, so no disclosure is required. Saying “read-only” still helps.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • commits a previously previewed write. Pass back the plantoken, statement, and params from the preview response (deleterows, insertrows, updaterows, or runmigration). If the plan is still awaiting approval, the call bloc

    Description quality grade B, 75/100 · 2 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • run EXPLAIN (FORMAT JSON) for a candidate read statement and return the planner's estimated cost and rows without executing it. A cheap pre-check before running something potentially expensive.

    Description quality grade C, 55/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: passed15/15

      Opens with an action verb.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • two-phase insert. Takes table, columns (an array of column names), and rows (an array of value-arrays, one per row, positional against columns), plus reason. Runs the INSERT ... VALUES (...), (...) RETURNING inside a trans

    Description quality grade C, 60/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • two-phase DDL. Takes statement (a single CREATE TABLE, ALTER TABLE, DROP TABLE, or CREATE [UNIQUE] INDEX ... ON <table> statement) and reason. Runs it inside a transaction — Postgres DDL is transactional, so this rolls back

    Description quality grade C, 60/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • two-phase update. Takes table, set (a { "column": value, ... } object of what to change), where + params (parameterized WHERE conditions, same convention as deleterows), confirmfulltable, and reason. Runs the UPDATE

    Description quality grade C, 60/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • a preview whose exact rollback-preview affected-row count is at or below this returns a token executeplan will honour immediately, same as today. Above it, the preview instead returns status: "awaitingapproval" and the token is re

    Description quality grade D, 40/100 · 4 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • a second, higher, separate threshold. A preview whose exact affected-row count exceeds this is refused outright: no token is issued at all, and there is no approval path — the response is a flat structured error (HARDMAXROWSEXCEEDED),

    Description quality grade C, 60/100 · 3 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: passed20/20

      The description mentions what the tool takes.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • how long a plantoken stays valid (default 60000). Overridable with SWPLANTTLMS.

    Description quality grade D, 40/100 · 4 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.

  • per-connection statementtimeout for write executions (default 10000). Overridable with SWSTATEMENTTIMEOUTMS.

    Description quality grade D, 40/100 · 4 to fix
    • Has a description: passed20/20

      The tool has a description an AI client can read.

    • Sensible length: passed20/20

      Length is in a useful range.

    • Starts with what it does: not passed0/15

      Open with an action verb, for example “Search issues…” or “Creates a label…”.

    • Mentions its inputs: not passed0/20

      Say what the tool needs, for example “by issue number” or “takes a file path”.

    • Explains side effects: not passed0/15

      This looks like a write action. Say what changes, and whether it can be undone.

    • Gives usage guidance: not passed0/10

      Add when to use it, what it requires, or what to use instead.