Skip to main content
Glama

Find sensitive columns

pg_find_sensitive_columns
Read-onlyIdempotent

Identify columns likely holding sensitive data by name, comment and type—passwords, tokens, IDs, emails, cards—without reading rows, so you can plan masking and access control.

Instructions

Find columns that look like they hold sensitive data, judging by column name, comment and type only: passwords, tokens and keys, CPF/CNPJ/SSN, emails, phones, payment cards, birth dates, salaries, addresses and similar, in English and Portuguese.

For each match it gives the table, column, type, category, why it was flagged, whether the table has row level security (rls) and whether it uses column-level grants (column_grants). The data itself is never read. Use it to plan masking and access control, or before exposing a schema to an application. schema narrows the search.

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": "pg_find_sensitive_columns"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
schemaNo
connectionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely new behavioral context: the data itself is never read, detection is heuristic and metadata-only, and it enumerates the fields returned including `rls` and `column_grants`. That last part is what an agent needs to decide whether a follow-up call is required. It stops short of 5 because it never says how confident the heuristic is or what happens on a schema with many matches.

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?

Front-loaded with the core purpose and the detection basis, then the return shape, then usage, then the one parameter — a sensible order with little padding. The long category enumeration is justified because it defines the tool's scope, though it could be tightened slightly.

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

Completeness3/5

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

Return fields are described in prose, compensating for the missing output schema, and the heuristic nature of the match is disclosed. However, for a three-parameter tool with zero schema documentation, leaving `connection` and `limit` undefined is a real gap an agent must guess around.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all parameter meaning, and it only explains one of three parameters ('`schema` narrows the search'). `limit` (default 100) and especially `connection` — which presumably selects which database is inspected — are left completely unexplained in both schema and description.

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?

States a specific verb and resource ('Find columns that look like they hold sensitive data') plus the detection basis ('column name, comment and type only') and the exact category set, including language coverage. An agent can distinguish this heuristic audit tool from catalog tools like pg_describe_table without opening a schema.

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?

Gives two concrete use cases ('plan masking and access control', 'before exposing a schema to an application') and notes that `schema` narrows the search. It does not name an alternative tool or state when not to use it, so it falls short of a 5, but the context is clear enough to route correctly.

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