import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';
import { type Db } from '@znet/catalog-db';
import { type Logger } from '@znet/shared';
import { type MagentoApi } from '@znet/magento';
import { type Caller } from './auth.js';
import type { CatalogApiClient } from './catalog-client.js';
import type { McpEnv, Scope } from './config.js';
export interface ToolDeps {
    catalog: CatalogApiClient;
    magento: MagentoApi;
    db: Db;
    env: McpEnv;
    log: Logger;
}
export interface ToolContext extends ToolDeps {
    caller: Caller;
}
export interface ToolDef<Shape extends z.ZodRawShape = z.ZodRawShape> {
    name: string;
    title: string;
    description: string;
    scope: Scope;
    input: Shape;
    run: (args: z.infer<z.ZodObject<Shape>>, ctx: ToolContext) => Promise<unknown>;
}
export declare const defineTool: <Shape extends z.ZodRawShape>(def: ToolDef<Shape>) => ToolDef;
/**
 * Register the tools the caller's scopes allow. Tools outside their scopes are not listed at all.
 * Every call is audited (with PII-redacted arguments) and errors are mapped to safe messages.
 */
export declare function registerTools(server: McpServer, tools: ToolDef[], deps: ToolDeps, caller: Caller): void;
//# sourceMappingURL=registry.d.ts.map