/** Shared helpers for MCP tool result formatting with TOON support. */ import { z } from 'zod'; import type { EncodeReplacer } from '@toon-format/toon'; /** * Shared format parameter for all MCP tools. * 'toon' is the default, token-efficient format; 'json' is the explicit fallback. */ export declare const formatParam: z.ZodOptional>; /** * Response format: 'toon' (default, token-efficient) or 'json' (explicit fallback). */ export type ResponseFormat = 'toon' | 'json'; /** * TOON-compatible replacer that strips sensitive/low-value Atlassian metadata fields. * Called for every key-value pair during encoding. Return undefined to omit the field. */ export declare const sensitiveFieldReplacer: EncodeReplacer; type McpContent = { content: Array<{ type: string; text: string; }>; }; /** * Encode data for an MCP tool response. * * @param data - The response data to encode. * @param format - 'toon' (default) or 'json'. TOON is compact and token-efficient. * @param useStreaming - When true, use encodeLines() (streaming TOON) instead of encode(). * Recommended for arrays of 20+ items. Ignored when format is 'json'. */ export declare function toMcpResult(data: unknown, format?: ResponseFormat, useStreaming?: boolean): McpContent; /** * Return raw text content for tools that produce pre-formatted text (e.g., job logs). * The text is returned unchanged — no encoding or filtering is applied. */ export declare function toRawTextResult(text: string): McpContent; export {}; //# sourceMappingURL=tool-helpers.d.ts.map