Skip to main content
Glama
YawLabs

@yawlabs/postgres-mcp

by YawLabs

pg_search_columns

Read-onlyIdempotent

Search across all user schemas for columns matching a pattern, using SQL LIKE wildcards. Identifies which tables contain a specific column.

Instructions

Search for columns by name across all user schemas. Supports SQL LIKE patterns (% matches any substring, _ matches one character). Case-insensitive. Use this instead of iterating pg_describe_table when the user asks 'which tables have X'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax rows to return (default 100).
schemaNoLimit to this schema. If omitted, searches all user schemas.
patternYesLIKE pattern. Use '%' for wildcard: 'user_id', '%email%', 'created_%'.
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, etc.), the description adds concrete behavioral details: case-insensitive search, SQL LIKE pattern support (with examples), and that it searches all user schemas. This fully informs the agent of the tool's behavior.

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 extremely concise: two sentences with no filler, plus a third sentence providing direct usage advice. It is front-loaded with the core action and immediately useful.

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?

For a simple search tool with no output schema, the description covers everything needed: purpose, pattern syntax, case sensitivity, scope, and when to use it. It is complete for an agent to correctly select and invoke the tool.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds semantic value by noting case-insensitivity and LIKE pattern syntax, which applies to the pattern parameter. It also reinforces that schema is optional. This is a modest but clear improvement over the schema alone.

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 tool searches for columns by name across all user schemas. It distinguishes itself from the sibling pg_describe_table by specifying that this tool is for finding 'which tables have X', avoiding the need to iterate.

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

Usage Guidelines5/5

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

Explicit guidance is provided: 'Use this instead of iterating pg_describe_table when the user asks "which tables have X".' This directly addresses when to use this over alternatives, which is highly valuable.

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/YawLabs/postgres-mcp'

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