Skip to main content
Glama
PlbKin190

postgres-mcp-lab

by PlbKin190

semantic

Read-onlyIdempotent

Rank rows by semantic similarity to a text query using pgvector cosine distance. Returns closest matches based on vector proximity.

Instructions

Rank rows using pgvector cosine distance. Default hash encoding measures token overlap, not meaning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
textYes
tableYes
schemaYes
columnsYes
vector_columnYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds valuable behavioral context beyond annotations: it uses cosine distance and warns that the default encoding may not actually capture meaning despite the 'semantic' name. This is important for setting correct expectations.

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?

Two sentences, front-loaded with the core purpose, followed by an important caveat. There is no fluff or repetition of schema/annotation information; every sentence earns its place.

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

Completeness2/5

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

For a tool with 6 parameters, 5 required, no output schema, and zero schema description coverage, the description is too sparse. It does not explain how parameters interact, what output the agent should expect, or how to construct a valid call. Annotations cover safety but not invocation completeness.

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

Parameters1/5

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

Schema description coverage is 0%, and the description provides no meaning for any of the 6 parameters (schema, table, vector_column, columns, text, k). With low schema coverage, the description carries the full burden for parameter semantics, and it fails to do so.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Rank') and resource ('rows'), and identifies the mechanism (pgvector cosine distance). It clearly signals a semantic search/ranking tool, which distinguishes it from sibling tools like query, though it does not explicitly name sibling alternatives.

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 provides clear context: this tool ranks by semantic similarity, with the caveat that default hash encoding measures token overlap rather than meaning. It implies when to use it (meaning-based ranking) but does not explicitly state when not to use it or name the alternative tool.

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

Deploy Server

Other Tools