/** * How a tool's output schema is exposed to clients in `tools/list`. * * Mirrors the OpenAPI adapter's `outputSchema.mode` (`definition` | `description` | * `both`) and adds `none` for "don't expose it at all": * * - `'definition'` (default): advertise it as the tool's `outputSchema` (JSON Schema). * - `'description'`: fold a readable rendering of the schema into the tool description * and omit `outputSchema`. * - `'both'`: advertise as `outputSchema` AND fold into the description. * - `'none'`: do not expose the output schema anywhere. * * Declarable on `@FrontMcp`, `@App`, and `@Tool`; resolved with a Tool > App > server * cascade (see {@link resolveOutputSchemaMode}). */ export declare const OUTPUT_SCHEMA_MODES: readonly ["definition", "description", "both", "none"]; export type OutputSchemaMode = (typeof OUTPUT_SCHEMA_MODES)[number]; /** * Rendering used when a schema is folded into a description (`'description'` / `'both'`). * * - `'summary'` (default): a compact human-readable property list. * - `'jsonSchema'`: a fenced JSON Schema code block. */ export declare const SCHEMA_DESCRIPTION_FORMATS: readonly ["summary", "jsonSchema"]; export type SchemaDescriptionFormat = (typeof SCHEMA_DESCRIPTION_FORMATS)[number]; /** Default exposure mode when unset at every level. */ export declare const DEFAULT_OUTPUT_SCHEMA_MODE: OutputSchemaMode; /** Default description rendering when unset at every level. */ export declare const DEFAULT_SCHEMA_DESCRIPTION_FORMAT: SchemaDescriptionFormat; /** * Output-validation + output-schema-exposure policy. Declarable on `@FrontMcp`, `@App`, * and `@Tool`; the effective value for a tool is resolved Tool > App > server > default. */ export interface OutputPolicy { /** * Allow non-finite numbers (`Infinity` / `-Infinity` / `NaN`) through to JSON * serialization (where they become `null`). Default `false` — non-finite numeric * output throws `InvalidOutputError`. * * @default false */ allowNonFinite?: boolean; /** * How `outputSchema` is exposed in `tools/list`. See {@link OutputSchemaMode}. * * @default 'definition' */ schemaMode?: OutputSchemaMode; /** * Rendering when {@link schemaMode} folds the schema into the description. * * @default 'summary' */ schemaDescriptionFormat?: SchemaDescriptionFormat; } /** * Zod schema for the `output` policy block, shared by the `@FrontMcp`, `@App`, and * `@Tool` metadata schemas so the option stays identical across all three. */ export declare const outputPolicySchema: import("@frontmcp/lazy-zod").ZodObject<{ allowNonFinite: import("@frontmcp/lazy-zod").ZodOptional; schemaMode: import("@frontmcp/lazy-zod").ZodOptional>; schemaDescriptionFormat: import("@frontmcp/lazy-zod").ZodOptional>; }, import("zod/v4/core").$strip>; /** Resolve the effective output-schema mode: Tool > App > server > default. */ export declare function resolveOutputSchemaMode(tool?: OutputPolicy, app?: OutputPolicy, server?: OutputPolicy): OutputSchemaMode; /** Resolve the effective description rendering: Tool > App > server > default. */ export declare function resolveSchemaDescriptionFormat(tool?: OutputPolicy, app?: OutputPolicy, server?: OutputPolicy): SchemaDescriptionFormat; /** * Render a (top-level object) JSON Schema as a description suffix for the * `'description'` / `'both'` modes. */ export declare function formatOutputSchemaForDescription(schema: Record, format: SchemaDescriptionFormat): string; //# sourceMappingURL=output-policy.d.ts.map