Skip to main content
Glama
foxter-io

PostgreSQL MCP Server

by foxter-io

Search Database Objects by Name

pg_search_objects
Read-onlyIdempotent

Search database objects by name pattern across schemas and types. Find tables, views, functions, indexes, sequences, constraints, and triggers using SQL LIKE wildcards.

Instructions

Search across all database objects (tables, views, functions, indexes, sequences, constraints) by name pattern.

Args:

  • pattern: Case-insensitive name pattern, supports SQL LIKE wildcards: % (any chars), _ (one char) (required)

  • object_types: Filter by object type — 'table', 'view', 'function', 'index', 'sequence', 'constraint', 'trigger' (optional, searches all types by default)

  • schema: Limit search to a specific schema (optional)

  • response_format: Output format

Returns: JSON: { matches: SearchResult[], count: number } Markdown: grouped results by type

Examples:

  • pattern: "user%" → all objects starting with "user"

  • pattern: "%order%" → all objects containing "order"

  • pattern: "idx_%" with object_types: ["index"] → all indexes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesLIKE pattern, e.g. "user%" or "%order%"
object_typesNoObject types to search (optional, searches all types by default)
schemaNoLimit to a specific schema (optional)
response_formatNoOutput format: 'markdown' for human-readable, 'json' for machine-readablemarkdown
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. The description adds useful behavioral context: return format (JSON or Markdown), grouping by type, and example patterns. No contradictions.

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 well-structured with Args, Returns, and Examples sections. It is concise yet comprehensive, with every sentence adding value. Front-loaded with the main purpose.

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?

Given the moderate complexity (4 parameters, no output schema), the description is complete. It covers all parameters, return format, and usage examples. No gaps remain.

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 value by explaining LIKE wildcards, providing examples for each parameter, and clarifying the default behavior for optional parameters.

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 specifies a clear verb ('search'), resource ('database objects'), and scope ('by name pattern'). It explicitly lists object types and distinguishes from sibling list tools by offering combined search.

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 when to use the tool with examples and context. It does not explicitly state when not to use it or contrast with siblings, but the usage is clear from the purpose and examples.

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/foxter-io/mcp-postgresql'

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