This server has 2 tools with basic definitions but significant quality gaps. Both tools lack input parameter descriptions, have minimal schemas, and lack error handling guidance. The execute_query tool has a dangerous SQL injection vulnerability despite claiming "rudimentary" prevention. Descriptions are present but generic. No output schemas documented. No pagination, no structured error guidance, and no tool annotations. The server barely meets minimum functional requirements.
Tools (2)
execute_queryread onlyauthsource verified52/100
Execute a SQL query on the Impala database and return results as JSON.
get_schemaread onlyauthsource verified37/100
Retrieve the list of table names in the current Impala database.
execute_query lacks input parameter description. The 'query' parameter has no description explaining format, constraints, or how to construct valid queries.
get_schema has empty input schema (no parameters) but lacks documentation of what it returns. Output schema is completely undocumented, LLMs cannot plan downstream tool calls if they don't know what fields to expect. LLMs need to know what fields to expect.'
execute_query uses inadequate SQL injection prevention. The code checks only if the first word is in ['select', 'show', 'describe', 'with'] but does NOT validate the full query structure. A malicious query like 'select * from users; drop table users; --' passes the check and executes destructively. Sanitize against SQL injection.' This is a security critical flaw.
execute_query
Recommendations
Add detailed parameter description to execute_query: 'SQL query to execute. MUST start with SELECT, SHOW, DESCRIBE, or WITH. Max 10,000 characters. Returns results as a JSON array of rows, or error message if execution fails. Limit: max 1000 rows returned.'
Document output schema for execute_query: clarify that it returns a JSON string containing an array of tuples (rows), where each tuple is a list of field values. Specify max row count (e.g., 'Limited to 1000 rows per query') and suggest pagination approach.
Enhance execute_query description to at least 150 characters, explicitly stating: (1) only read-only queries allowed, (2) supported statement types (SELECT, SHOW, DESCRIBE, WITH), (3) output format (JSON array of rows), (4) result limit (1000 rows max), (5) when to use get_schema first.
Replace string-based SQL injection prevention with parameterized queries or a dedicated query parser/validator. Current check allows 'SELECT * FROM users; DROP TABLE users;' attacks. Implement allowlist-based statement validation using a SQL parser library.
Add explicit error classification to error handling. For execute_query, return: '{ "error": "<message>", "type": "validation|connection|syntax|timeout", "recovery": "<hint>" }' instead of raw exception strings. For 'user not found' or connection errors, suggest next steps: 'Try get_schema() to list available tables' or 'Check IMPALA_HOST and credentials in environment.'
Enhance get_schema description: 'Returns a JSON array of table names in the current database. Call this first to discover available tables before writing queries. Example output: ["users", "orders", "products"]. Does not include views or external tables.'
Database credentials hardcoded as environment variables with weak defaults. The code includes default values like 'coordinator-default-impala.example.com', 'username', 'password'. If env vars are missing, the server connects with placeholder credentials, risking exposure or connection errors. Use server-side secret injection via environment variables or vault.' The env var approach is correct, but missing credential validation and weak defaults are problematic.
execute_query description is generic (45 chars) and does not explain limitations. 'Execute a SQL query on the Impala database and return results as JSON.' does not mention that only read-only queries are allowed, does not explain what format the JSON takes, and does not guide the LLM on expected behavior.
get_schema description is vague (59 chars). 'Retrieve the list of table names in the current Impala database.' does not explain the structure of the returned list, whether it includes schema names, partitions, or other metadata, and does not guide the LLM on when to call this tool vs. querying metadata directly.
No tool annotations. Neither execute_query nor get_schema declare readOnlyHint, destructiveHint, or idempotentHint. Per 2026-07-28 spec, tools should annotate their safety properties. This is a current-spec gap.
execute_queryget_schema
Document output structure for get_schema: clarify the format (simple string array, or objects with schema/table/type fields?). Specify max table count returned and whether pagination is supported.
Add readOnlyHint: true to both tools (via fastmcp decorator or schema field) to signal to LLMs and clients that these tools do not modify state.
Add idempotentHint: true to both tools to indicate that repeated calls with the same input produce identical results.
Implement result limiting with a limit parameter (default 20, max 100) for execute_query. Document in description: 'Limit results to N rows. If more rows exist, consider adding WHERE or LIMIT clauses to your query.'
Add connection validation at server startup. If IMPALA_HOST, IMPALA_USER, or IMPALA_PASSWORD are unset or match defaults ('username', 'password'), log a warning and fail fast rather than attempting to connect with broken credentials.
Enrich error messages with context. Instead of 'Error: Connection refused', return 'Error: Could not connect to Impala at coordinator-default-impala.example.com:443. Check IMPALA_HOST, IMPALA_PORT, IMPALA_USER, and network connectivity.'
Add a tool annotation or description note documenting that execute_query enforces read-only semantics and will reject non-SELECT statements.