Minimal warehouse-pinned Databricks SQL MCP server. A single-file MCP server that demonstrates deterministic warehouse selection and authentication patterns for Databricks SQL queries.
Single tool 'execute_sql' has a well-structured description (194 chars) and clear parameter documentation. Input schema is complete with proper types (string) and descriptions for both 'query' and 'warehouse_id' parameters. Output schema is documented in the description ('status, warehouse_id, columns, rows, row_count'). Error handling returns structured error objects. However, the tool lacks formal output schema definition in the registration, parameter constraints (no enum for warehouse_id fallback behavior), and does not declare idempotency or destructiveness hints. The description is good but could be more concise for LLM parsing. No pagination, batch operations, or recovery guidance for common failure modes (e.g., warehouse not found, query timeout).
Execute a SQL query on a Databricks SQL warehouse. Args: query: The SQL statement (e.g. "SELECT current_user()"). Use fully qualified Unity Catalog names (catalog.schema.table) for best results. warehouse_id: Optional override. When omitted, falls back to the `DATABRICKS_WAREHOUSE_ID` env var set at server launch. Returns: On success: `{status, warehouse_id, columns, rows, row_count}` On error: `{error: <message>}` with no row data. The `warehouse_id` field in the response echoes which warehouse handled the query — callers can use it to confirm pinning is working.
Output schema not formally declared in tool registration. Description mentions fields but no JSON Schema output type is visible in the @mcp.tool decorator or response type hint.
No tool annotations (readOnlyHint, idempotentHint, destructiveHint). 'execute_sql' is marked READ_ONLY in metadata but this is not reflected in the tool definition itself.
warehouse_id parameter lacks constraint documentation. Description says 'Optional override' but does not explain format, length, or validation rules. LLMs cannot infer valid warehouse ID format.
Error handling returns generic exception messages ('error: <message>') without recovery guidance. No distinction between retryable errors (timeout, transient failure) and user-fixable errors (invalid warehouse_id, malformed SQL).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 56 | <=2025-11-25 | v2 |
No pagination or result limits documented. Large result sets (thousands of rows) could exhaust context window. Description should state max rows returned and offer offset/limit parameters.