/** * @fileoverview DataCanvas SQL query tool — run SELECT SQL against canvas-registered tables. * Only meaningful when CANVAS_PROVIDER_TYPE=duckdb. * @module mcp-server/tools/definitions/dataframe-query.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const dataframeQuery: import("@cyanheads/mcp-ts-core").ToolDefinition; }, z.core.$strip>, z.ZodObject<{ rows: z.ZodArray>; row_count: z.ZodNumber; sql: z.ZodString; canvas_id: z.ZodString; }, z.core.$strip>, readonly [{ readonly reason: "canvas_disabled"; readonly code: JsonRpcErrorCode.ConfigurationError; readonly when: "CANVAS_PROVIDER_TYPE is not set to duckdb — DataCanvas is unavailable."; readonly recovery: "Set CANVAS_PROVIDER_TYPE=duckdb in server config and restart."; }, { readonly reason: "canvas_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "canvas_id does not match any registered canvas."; readonly recovery: "Canvas tokens expire after inactivity and cannot be listed. Re-run socrata_query_dataset to stage a fresh canvas and pass the canvas_id it returns."; }, { readonly reason: "table_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "The SQL referenced a canvas table that does not exist — expired, dropped, or a mistyped name."; readonly recovery: "List staged tables and their schemas with socrata_dataframe_describe, or re-run socrata_query_dataset to re-stage the data, then reference the exact table name."; }, { readonly reason: "sql_rejected"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "SQL was not a SELECT statement, referenced a system catalog, or contained disallowed functions."; readonly recovery: "Only SELECT statements against registered tables are allowed. Remove DDL, DML, file-reading functions (read_csv, read_parquet), PRAGMA statements, and system catalog references (information_schema, pg_catalog, sqlite_master, duckdb_*). Use socrata_dataframe_describe to list tables and schemas."; }], { readonly notice: z.ZodOptional; readonly truncated: z.ZodOptional; readonly shown: z.ZodOptional; readonly cap: z.ZodOptional; }>; //# sourceMappingURL=dataframe-query.tool.d.ts.map