import { type MetaObject, type ResourceLink } from "@modelcontextprotocol/server"; import type { ToolDefinition } from "./tools.js"; /** Search text supplied by the composer; empty and whitespace queries are valid. */ export interface MentionSearchParams { /** Application-owned search text, passed through without normalization. */ query: string; } /** App-owned resource identities suggested by a mention search. */ export interface MentionSearchResult { /** Authorized links in application-defined order; an empty list means no matches. */ items: ResourceLink[]; } /** Register an ordinary tool for native composer mention search. */ export interface MentionsRegistration { /** Non-blank tool name, unique among existing registrations. */ name: Name; /** Optional human-readable tool title. */ title?: string; /** Optional explanation of the searchable items. */ description?: string; /** Tool icons, resolved by the ordinary tool pipeline. */ icons?: NonNullable; /** Tool annotations; search is read-only by default. */ annotations?: NonNullable; /** Descriptor metadata; unrelated UI and extension fields are preserved. */ _meta?: NonNullable; /** Explicit visibility; app visibility is always included. */ visibility?: NonNullable; /** Authorize, rank, and limit results using the ordinary request context and signal. */ search: (params: MentionSearchParams, ctx: Ctx) => MentionSearchResult | Promise; } /** Generate schemas and the owned mention marker without invoking search. @internal */ export declare function prepareMentions(options: MentionsRegistration): { /** Non-blank tool name, unique among existing registrations. */ name: Name; /** Optional human-readable tool title. */ title?: string; /** Optional explanation of the searchable items. */ description?: string; /** Tool icons, resolved by the ordinary tool pipeline. */ icons?: NonNullable; /** Explicit visibility; app visibility is always included. */ visibility?: NonNullable; inputSchema: import("@modelcontextprotocol/server").StandardSchemaWithJSON<{ query: string; }, { query: string; }>; outputSchema: import("@modelcontextprotocol/server").StandardSchemaWithJSON; annotations: { title?: string | undefined; destructiveHint?: boolean | undefined; idempotentHint?: boolean | undefined; openWorldHint?: boolean | undefined; readOnlyHint: boolean | undefined; }; _meta: { "openai/extensions": { "mentions/search": {}; }; }; }; /** Restore mention visibility after ordinary view URI ownership is resolved. @internal */ export declare function finalizeMentionsMeta(definition: ToolDefinition, metadata: MetaObject | undefined): MetaObject;