import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; /** * Wrap any JSON-serialisable value as an MCP tool result. This is the single * most duplicated snippet across the fleet: * `{ content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }` */ export declare function textResult(data: unknown): CallToolResult; /** Alias for {@link textResult} — pretty-printed JSON tool result. */ export declare const jsonResult: typeof textResult; /** Return a raw string as a text tool result (no JSON stringify). */ export declare function rawTextResult(text: string): CallToolResult; /** Return a base64 image as an MCP image tool result. */ export declare function imageResult(base64: string, mimeType: string): CallToolResult; /** * Return an error tool result (`isError: true`) carrying a message. The message * is run through {@link redactSecrets} so `errorResult(String(err))` can't leak * tokens/cookies an upstream error carries — redaction only, never truncated. */ export declare function errorResult(message: string): CallToolResult; /** * Collapse a JSON:API-shaped payload (`{ data: { id, type, attributes } }` or an * array thereof) into plain objects with `id`/`type` merged into attributes. * Used by skylight-mcp; opt-in (callers pass payloads they know are JSON:API). */ export declare function flattenJsonApi(payload: unknown): unknown; /** * Recursively rewrite every occurrence of a named **string** field in a parsed * JSON value, in place, returning the same value. Non-string values of that key * and all other keys are left untouched. Handy for normalizing a date/format * field out of an API response, e.g. * `deepMapStringField(data, 'eventDate', dmyToIso)`. */ export declare function deepMapStringField(value: T, field: string, map: (v: string) => string): T; /** * Shallow-copy an object, dropping every `undefined`-valued key. `null` and * falsy values survive — only `undefined` means "not provided". * * Consolidates the byte-identical `compact()` (skylight) / `prune()` (viator / * alltrails) helpers the compact-projection tools call dozens of times per repo. */ export declare function pruneUndefined>(obj: T): Partial; /** * Coerce a maybe-array to an array: an array passes through (same reference), a * bare value is wrapped, and `null`/`undefined` become `[]`. * * Consolidates the `toArray` twins in canvas-parent / infinitecampus — both * guard XML→JSON serializers where a single item arrives as a bare object * rather than a 1-element array. */ export declare function toArray(value: T | T[] | null | undefined): T[]; //# sourceMappingURL=index.d.ts.map