/** * Structured output support (roadmap 1.2). * * MCP tools may expose a typed `structuredContent` payload alongside the * human/agent-readable Markdown text. When a tool declares an `outputSchema`, * the SDK validates `structuredContent` on every successful response and * skips validation when `isError` is set. Tools therefore return a * `StructuredToolResult` and the registration handler converts it via * `toMcpResult`. */ import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export interface StructuredToolResult { /** Always present: the Markdown text channel. */ markdown: string; /** Typed payload, validated against the tool's outputSchema (success only). */ structured?: Record; /** When true, this is an error result; structured-output validation is skipped. */ isError?: boolean; } /** * Converts a tool's `StructuredToolResult` into the MCP `CallToolResult`. * - Error → `{ content, isError: true }` (no structured payload required). * - Success → `{ content, structuredContent }` when a payload is present. */ export declare function toMcpResult(result: StructuredToolResult): CallToolResult; export interface SidraRecords { /** Column labels, in order (from the SIDRA header row). */ colunas: string[]; /** Data rows as label→value objects. */ registros: Record[]; /** Total number of data rows. */ totalRegistros: number; } /** * Converts a SIDRA-style response into labeled columns + records. The first * element of `data` is the header/label row; the rest are data rows keyed the * same way. Shared by every SIDRA-backed tool's structured output. */ export declare function sidraRecords(data: Record[]): SidraRecords; /** * Field selection for SIDRA-style data (roadmap 1.2): keeps only the columns * whose header label matches one of the comma-separated `campos` tokens * (accent/case-insensitive substring match). Filters the header and every data * row, so both the structured payload and the Markdown table shrink together. * * Returns the data unchanged when `campos` is empty or matches no column (so a * mistaken filter never blanks out the result). */ export declare function selectSidraColumns(data: Record[], campos?: string): Record[]; //# sourceMappingURL=structured.d.ts.map