import { completable as sdkCompletable, type StandardSchemaV1 } from "@modelcontextprotocol/server"; /** Context passed to completion callbacks. */ export interface CompletionContext { /** Other argument values from the same prompt, for contextual suggestions. */ arguments?: Record; } /** Callback form: return suggestions for the current (partial) value. */ export type CompletionCallback = (value: string, context?: CompletionContext) => string[] | Promise; /** * Build the shared case-insensitive prefix completer used by static values. * * @param values - Values retained in declaration order and stringified once. * @returns A callback that filters the values against an untrimmed prefix. * * @internal */ export declare function createPrefixCompletion(values: ReadonlyArray): (value: unknown) => string[]; /** * Make a schema field completable so clients can request autocomplete * suggestions via `completion/complete`. * * Pass an array of allowed values for case-insensitive prefix matching, or a * callback for dynamic/contextual suggestions. * * Accepts any Standard Schema field ({@link StandardSchemaV1}); zod shown in * the example. Apply refinements like `.describe()` to the schema *argument*, * not to the completable result: refinements that clone the schema (as zod's * do) silently drop the SDK's completion marker. `.optional()` is the one * exception — the SDK unwraps optionals when looking for completions. * * @example * ```ts * schema: z.object({ * language: completable( * z.string().describe("The programming language"), * ["python", "typescript", "go"] * ), * }) * ``` */ export declare function completable(schema: T, complete: ReadonlyArray | CompletionCallback): ReturnType>;