/** * What an operation is called on the MCP surface. * * **The source is the operation id the DOCUMENT publishes, and it is never re-spelled.** An * operation id is a contract fact; a generated second spelling of it is a name no reader of the * document can predict. So a name this emitter cannot carry is REFUSED rather than rewritten -- the * same rule the sibling emitter holds for path templates, and for the same reason: a surface that * works and is wrong is strictly worse than one that is absent and says so. */ export declare function toolNameFor(operationId: string, prefix: string | undefined): string; export declare function isRepresentable(name: string): boolean; export interface NamedTools { /** Operation id to tool name, for everything that survived. */ readonly names: ReadonlyMap; /** Operation ids refused because the name is unrepresentable. */ readonly unrepresentable: readonly { readonly operationId: string; readonly name: string; }[]; /** Tool names two operations both produced. BOTH operations are refused. */ readonly collisions: readonly { readonly name: string; readonly first: string; readonly second: string; }[]; } /** * Name every selected operation, and report what cannot be named. * * **A collision refuses BOTH operations, deliberately.** Keeping one and dropping the other would * make the tool surface depend on which operation the emitter happened to reach first -- a surface * that answers, and answers as the wrong operation. */ export declare function nameTools(selected: readonly string[], prefix: string | undefined): NamedTools;