Skip to main content
Glama
chncaesar

pg-semantic-mcp

by chncaesar

search_schema

Search database schema semantically by keyword. Uses LLM to match natural language terms to relevant tables and columns based on schema cache and semantic layer.

Instructions

Semantically search tables and columns by keyword using LLM.

Combines the in-memory schema cache and the semantic layer markdown (if configured) into a prompt, then calls the configured LLM to find relevant tables and columns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoOptional filter — "table" to match tables only, "column" to match columns only. Omit to search both tables and columns.
keywordYesNatural language search term (e.g. "customer receivables", "WIP inventory", "应收账款").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description goes beyond a generic statement by explaining the internal process: it combines the in-memory schema cache and semantic layer markdown into a prompt, then calls the LLM. Since no annotations are provided, this contextual detail about the tool's behavior is valuable and clarifies that results are LLM-based, not exact matches.

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 two sentences and immediately states the tool's purpose, followed by a concise explanation of how it works. There is no redundancy or filler.

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 a simple two-parameter schema and an output schema present, the description sufficiently covers what the tool does and how it operates. It does not need to explain return values because the output schema exists, and there are no hidden behaviors or complex side effects.

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?

The input schema already describes both parameters fully: 'keyword' as a natural language search term and 'type' as an optional filter. The description adds little beyond the schema's coverage, so the baseline score of 3 is appropriate.

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 states a specific verb ('search') and resource ('tables and columns'), and clarifies it's semantic search using an LLM. This distinguishes it from sibling tools like list_tables, describe_table, and sample_data.

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

Usage Guidelines3/5

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

The description implies the tool is for finding relevant tables/columns by meaning, but it does not explicitly state when to use it versus alternatives, nor does it mention any exclusions or prerequisite conditions. The usage intent is implicit rather than explicit.

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/chncaesar/pg-semantic-mcp'

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