MCP server for PostgreSQL sales database operations with tools for querying sales data, inventory status, and analytics
This MCP server provides 10 tools for sales database operations via FastMCP. Tool definitions are present with basic schemas and descriptions, but significant quality gaps reduce usability for LLM-based agents. All tools have descriptions (10-70 chars), but many are too terse and lack actionable context. Input schemas are present but minimal, most lack parameter descriptions beyond the name. The `execute_sql` tool exposes a dangerous WRITE operation without safeguards, validation, or dry-run capability. Output schemas are entirely undocumented, forcing LLMs to guess at response structure. Error handling is absent, no recovery guidance or categorization. Tool composition lacks pagination for result-bearing calls (e.g., `get_top_products`, `get_distinct_values`). Names follow verb_noun convention (good), but parameter naming is inconsistent (sometimes 'table_name', sometimes implicit). This server is functional for basic use but would not pass production code review.
Execute a SQL query against the sales database
List all tables in the database
Get distinct values from a column
Get current inventory status
Get sales statistics by store
Get overall sales summary statistics
Get formatted metadata for one or more tables
execute_sql tool exposes arbitrary SQL WRITE/DELETE/DROP without validation, safeguards, or dry-run capability. A misconfigured agent could delete the entire database.
No output schemas documented for any tool. LLMs cannot predict response structure, field types, or nested objects. Forced to infer structure by calling tools and parsing results, wasting tokens and inviting parsing errors.
Most tool descriptions are under 40 characters (baselines: avg 194 chars, p90 392 chars). Descriptions lack WHEN to use each tool, WHAT distinguishes it from similar tools, and prerequisite context. LLMs cannot reliably select the right tool.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Get schema information for a specific table
Get top selling products
Test database connection
No pagination support. Tools like get_distinct_values, get_sales_by_store, and get_inventory_status likely return many rows. Without limit/offset or cursor, results can exhaust context window or cause timeouts.
Parameter descriptions missing. Most parameters (e.g., 'table_name', 'column_name', 'query') lack inline descriptions in the schema. Rubric requires 100% of A+ tools to have parameter descriptions; this server has ~10%.
No error handling or recovery guidance. Tools do not document what errors are possible (e.g., table not found, query timeout, connection failed) or suggest next steps for the LLM. Hard to debug or retry intelligently.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). execute_sql is destructive and carries replay risk; other tools are read-only but not declared. LLMs cannot reason about side effects or retry safety.
Parameter 'limit' in get_top_products has no min/max constraints. Unbounded integers invite LLMs to pass extreme values (0, -1, 1000000) that break or timeout queries.