Skip to main content
Glama

security_pghba_check

Read-only

PostgreSQL pg_hba.conf security check — Offline audit of a PostgreSQL pg_hba.conf. Parses every rule (local/host/hostssl/hostnossl/gssenc, address+netmask, options, line continuations, include directives) and flags trust from the network, trust on local sockets, replication without passwords, cleartext password and deprecated md5 auth, ident over TCP, LDAP without TLS, host/hostnossl allowing plaintext from remote clients, 0.0.0.0/0 and very wide public ranges, all-databases/all-users rules, rules made unreachable by an earlier line (first match wins) and syntax errors that stop PostgreSQL loading the file. Verdict PASS/REVIEW/FIX BEFORE DEPLOY/BLOCK with score, grade, parsed rules and fixes. Params: text= (file contents) or url=. Price: $0.005 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "security_pghba_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYeslocal all all peer host all all 0.0.0.0/0 trust

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover readOnly/openWorld/destructive hints, and the description goes well beyond them: it discloses the verdict tiers (PASS/REVIEW/FIX BEFORE DEPLOY/BLOCK), what accompanies the verdict (score, grade, parsed rules, fixes), and the metered price of $0.005 USDC via x402. Cost and authorization context are exactly the kind of behavioral detail annotations cannot express.

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 purpose and input/output shape are front-loaded, and the dense middle list of checks is defensible for a security scanner because each item is a distinct detection capability. It is a single unbroken block, however, and the price sentence could be separated for scanning.

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

Completeness5/5

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

With no output schema, the description compensates by spelling out the return shape: verdict, score, grade, parsed rules, and fixes. Inputs, scope, and cost are all covered, leaving nothing material an agent needs before invoking it.

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 coverage is 100%, so the text parameter is already documented, and the description adds only that text holds file contents. The mention of 'url=' is helpful in spirit but does not exist in the input schema, so an agent following the description could send a parameter the tool rejects; that mismatch undercuts value rather than adding it.

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?

Names a specific verb and resource ('Offline audit of a PostgreSQL pg_hba.conf'), and the resource itself distinguishes it from siblings such as security_nginx_check or security_sshd_check. The enumeration of what is parsed (directives, address+netmask, continuations, include) makes the scope unambiguous.

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?

Explicitly frames the tool as an offline audit of file contents, which tells the agent it needs no live database connection, and the closing 'Params:' line establishes the two input routes. It stops short of stating when-not-to-use or naming an alternative tool, so 4 rather than 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources