/** * Tool registry: the single place that knows every tool this connector ships, * which ones write to Clio, and how they are annotated for MCP clients. * * `registerAllTools` is used by the stdio entry point, the built-in HTTP * transport, and by hosts that embed the connector as a library. It wraps the * McpServer in a thin facade so the individual `register*Tools` modules stay * untouched: the facade decides whether a tool is registered at all (READ_ONLY, * auth mode, explicit exclusions) and injects `title` + `annotations` for every * tool that is. * * Fail-closed rule: a tool name that is missing from TOOL_META is treated as a * write tool. Add every new tool here; `registry.test.ts` enforces it. */ import type { McpServer, RegisteredTool } from "@modelcontextprotocol/sdk/server/mcp.js"; export interface ToolMeta { /** Human-readable name shown by MCP clients. */ title: string; /** True when the tool never changes Clio data or local auth state. */ readOnly: boolean; /** True when the tool can irreversibly change data. Defaults to !readOnly. */ destructive?: boolean; /** True when repeating the call with the same args has no extra effect. Defaults to readOnly. */ idempotent?: boolean; } /** Tools that write to Clio. Hidden entirely when READ_ONLY is on. */ export declare const WRITE_TOOLS: ReadonlySet; /** Tools that manage the connector's own Clio login rather than Clio data. */ export declare const AUTH_TOOLS: ReadonlySet; export declare const TOOL_META: Readonly>; /** Registration order is stable so tool lists are deterministic across transports. */ export declare const REGISTRARS: ReadonlyArray<(server: McpServer) => void>; export interface RegisterAllToolsOptions { /** Hide every tool in WRITE_TOOLS. Same effect as READ_ONLY=true. */ readOnly?: boolean; /** * "full" (default): auth_status, authenticate, logout. * "status": auth_status only; for hosts that run their own login flow. * "none": no auth tools at all. */ auth?: "full" | "status" | "none"; /** Register the compliance-notice and auth-status resources. Default true. */ resources?: boolean; /** Extra tool names to leave unregistered, whatever their meta says. */ exclude?: readonly string[]; /** Replace the compliance-notice resource text (hosts say where their audit log lives). */ complianceNotice?: string; } /** READ_ONLY=true|1|yes turns the read-only gate on. Anything else leaves it off. */ export declare function isReadOnlyEnv(env?: NodeJS.ProcessEnv): boolean; /** * Register every tool (subject to the options) on `server` and return the * handles keyed by tool name. Tools that are skipped are simply never * registered, so they do not appear in tools/list and tools/call rejects them. */ export declare function registerAllTools(server: McpServer, opts?: RegisterAllToolsOptions): Map; //# sourceMappingURL=index.d.ts.map