An MCP server that executes SQL queries on Cloudera Hive through an Impala connection
Single tool with minimal schema documentation and generic description. Tool is directly visible in source code (server.py line 20-24) with registration via @mcp.tool() decorator. Input schema is inferred from function signature only, no explicit JSON Schema with descriptions visible. Tool description is present but generic and lacks actionable context for LLM selection. No output schema documented. No error handling guidance. No parameter validation beyond a simple readonly check. Credentials hardcoded in environment variables without validation. No pagination, no structured response format beyond raw JSON dump.
Execute a SQL query on the Impala database and return results as JSON.
Input schema lacks explicit JSON Schema with parameter descriptions. Only function signature visible; no description for 'query' parameter.
Tool description is 82 characters but generic. Does not answer: What does it return? When should I use it vs. other tools? What are the prerequisites? No dependency hints (e.g., 'only SELECT/SHOW/DESCRIBE queries allowed').
No output schema documented. Tool returns raw JSON string of rows or error message. LLM cannot predict structure (e.g., will it be an array, object with metadata, string error). Lacks pagination support despite potentially large result sets.
SQL injection prevention relies on naive prefix check ('select', 'show', 'describe', 'with'). This is insufficient, a query like 'WITH cte AS (DELETE FROM table) SELECT * FROM cte' bypasses the check. No parameterized query support visible.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 45 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 33 | - | v1 |
Database credentials (IMPALA_HOST, IMPALA_USER, IMPALA_PASSWORD) exposed as environment variables without validation. No mention of secret vault or secure injection. Credentials visible in examples/langchain_example.py hardcoded in plaintext.
Error handling returns raw exception strings ('Error: {str(e)}') without actionable guidance. LLM cannot determine if error is retryable, user-fixable, or fatal. No attempt/retry logic documented.
No rate limiting, timeout, or result limit enforcement. A query returning millions of rows would blow the context window. Tool description does not warn of this risk.
Tool accepts arbitrary SQL but description says 'SQL query' without format constraints. No enum of allowed query types, no length limits, no character restrictions stated in schema or description.