/** * @fileoverview Shared formatting utilities for tool definition format() functions. * Centralizes USD formatting, safe record field access, and the pagination schema * reused across multiple tools. * @module src/mcp-server/tools/definitions/format-helpers */ import { z } from '@cyanheads/mcp-ts-core'; /** * Build a search criteria summary from tool input. * Strips undefined/null, empty strings, and pagination params so only * meaningful search filters remain. */ export declare function buildSearchCriteria(input: Record): Record; /** * Render an empty-result format block with echoed search criteria and a * domain-specific suggestion. Used by all tool format() functions. * `mode` is the resolved query mode for multi-mode tools; omit it elsewhere. */ export declare function formatEmptyResult(criteria: Record | undefined, hint: string, mode?: string): { type: 'text'; text: string; }[]; /** * Render the criteria echo as one compact line for non-empty responses, so the * markdown surface carries the same applied-filter record as structuredContent. * Returns null when there is nothing to echo. */ export declare function formatSearchCriteria(criteria: Record | undefined): string | null; /** Reusable search_criteria output field schema — always populated. */ export declare const SearchCriteriaSchema: z.ZodObject<{}, z.core.$loose>; /** Format a number as USD or return 'N/A' for non-numeric values. */ export declare const fmt$: (n: unknown) => string; /** Safely read a string field from an untyped record. */ export declare const str: (rec: Record, key: string) => string; /** Reusable page-based pagination output schema. */ export declare const PaginationSchema: z.ZodObject<{ page: z.ZodNumber; pages: z.ZodNumber; count: z.ZodNumber; per_page: z.ZodNumber; }, z.core.$strip>; /** * Render all non-empty fields from a record as indented `key: value` lines. * Pass `skip` to exclude fields already rendered in a header line. */ export declare function renderRecord(rec: Record, skip?: ReadonlySet): string; //# sourceMappingURL=format-helpers.d.ts.map