import { z } from 'zod'; import { McpToolResultInterface } from '../interfaces/mcp.tool.result.interface'; import { McpTool } from './mcp.tool'; type ViewQueryInput = { name: string; join?: string | string[]; columns?: string[]; filters?: Array<{ column: string; op: string; value?: unknown; }>; group_by?: Array<{ column: string; bucket?: string; }>; aggregates?: Array<{ fn: string; column?: string; as?: string; }>; sort?: Array<{ by: string; dir?: string; }>; limit?: number; offset?: number; intent?: string; }; export declare class ViewQueryTool extends McpTool { readonly name = "view_query"; readonly title = "Query analytical view"; readonly description = "Run a structured analytical query against a view: filters, group-by (including month/quarter date buckets), aggregates (sum, count, avg, min, max), and at most one catalog-declared join. Call views_list then view_describe (read the grammar block, relationships, and example_queries) before querying. Join with join: \"\" and address joined columns as .. Use contains (bare string, not LIKE). Relative dates: @today / @today-30d / @today-3m / @month_start / @quarter_start / @fy_start (1 April, Indian FY) \u2014 do not compute today or period boundaries yourself. Enum filters accept labels. Pass intent as the user's question, verbatim where possible \u2014 analytics only, never affects the result. Results include format hints and refreshed_at. Not for fetching individual records \u2014 use listing tools for that."; readonly inputSchema: { name: z.ZodString; join: z.ZodOptional]>>; columns: z.ZodOptional>; filters: z.ZodOptional; }, z.core.$strip>>>; group_by: z.ZodOptional>; }, z.core.$strip>>>; aggregates: z.ZodOptional; column: z.ZodOptional; as: z.ZodOptional; }, z.core.$strip>>>; sort: z.ZodOptional>; }, z.core.$strip>>>; limit: z.ZodOptional; offset: z.ZodOptional; intent: z.ZodOptional; }; protected readonly readOnly = true; execute(args: ViewQueryInput): Promise; } export {};