Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Full text search

full_text_search
Read-only

Rank a text column's documents against a full-text query using PostgreSQL's built-in tsvector/tsquery with web-search syntax support, returning matched rows and rank scores.

Instructions

Rank a text column's documents against a full-text query using PostgreSQL's built-in tsvector/tsquery. The query accepts web-search syntax (quoted phrases, or, - exclusion). Returns a list of objects with the matched row's primary key columns plus rank (ts_rank score, higher = better match).

Example: full_text_search(schema='public', table='articles', column='body', search_query='"new york" OR -draft')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
tableYes
columnYes
configNoenglish
schemaYes
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.
search_queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already indicate readOnlyHint=true. The description adds behavioral context: it explains the query syntax (web-search with quoted phrases, OR, -exclusion), output format (primary key columns + rank), and gives an example. It does not contradict annotations.

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 concise, with two sentences of purpose and behavior, plus a clear example. Every sentence adds value, and the structure is well-organized with purpose, syntax, output, and example.

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

Completeness4/5

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

Given the output schema exists, the description adequately covers the return structure (primary key columns + rank). It mentions the query syntax and gives an example. Minor gaps: it does not explain the 'config' parameter options or default behavior for 'limit', but overall it is sufficient for the tool's complexity.

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?

Schema description coverage is low (14%, only 'database' has a description). The description adds meaning to 'search_query' by explaining web-search syntax, and the example shows how to use 'schema', 'table', 'column', and 'search_query'. However, it does not explain 'limit', 'config', or the 'database' parameter beyond the schema's minimal note.

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 ranks a text column's documents against a full-text query using PostgreSQL's tsvector/tsquery, with a specific verb ('Rank') and resource ('text column'). It also provides an example and distinguishes from sibling tools by focusing on native PostgreSQL full-text search.

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 use for full-text search with web-search syntax but does not explicitly state when to use this tool versus alternatives like fuzzy_search, hybrid_search, or vector_search. No exclusions or alternative guidance are provided.

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/devopam/MCPg'

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