import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import { type AccessPolicy } from "../config/access-policy.js"; import type { JsonApiResource } from "../types.js"; /** * `boond_find` — name (or e-mail) → id, in one call (issue #262). * * Every other tool takes numeric ids, and until now only the prompts resolved * a label: "mets à jour la fiche de Jean Dupont" cost the model a search with * the right `keywordsType`, a choice among homonyms, then the `_get`. This * tool owns that sequence: it picks the field to search per entity (`fullName` * with the `NOM#PRENOM` form the API expects — tried in both orders, since a * user types "Jean Dupont" as often as "Dupont Jean" —, `emails`, `name`), and * it **refuses to choose** among several exact matches: an ambiguous name * comes back as `isError` with the list, never as a silent first-row pick. */ declare const ENTITY_DOMAIN: { readonly candidate: "candidates"; readonly resource: "resources"; readonly contact: "contacts"; readonly company: "companies"; readonly opportunity: "opportunities"; readonly project: "projects"; }; export type FindEntity = keyof typeof ENTITY_DOMAIN; export declare const FindOutputSchema: z.ZodObject<{ entity: z.ZodString; query: z.ZodString; count: z.ZodNumber; match: z.ZodOptional>; ambiguous: z.ZodOptional; items: z.ZodArray; exact: z.ZodBoolean; }, z.core.$strip>>; }, z.core.$strip>; /** The search calls to try, in order; the first one that returns a row wins. */ export declare function searchAttempts(entity: FindEntity, query: string, email?: string): Array>; export interface FoundItem { id: string; label: string; detail?: string; exact: boolean; } /** Human label + disambiguation detail for one search row. */ export declare function describeRow(entity: FindEntity, row: JsonApiResource): { label: string; detail?: string; }; /** Exact = same label ignoring case / accents / spacing; for people, both word orders count; for e-mail lookups, the e-mail itself. */ export declare function isExactMatch(entity: FindEntity, row: JsonApiResource, item: { label: string; }, query: string, email?: string): boolean; export declare function registerFindTool(server: McpServer, policy?: AccessPolicy): void; export {}; //# sourceMappingURL=find.d.ts.map