import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { ZodType } from 'zod';
import type { ToolResult } from '../types/index.js';
/**
 * A Zod raw shape — map of field names to Zod types.
 * Matches ZodRawShapeCompat from the MCP SDK (Record<string, AnySchema>).
 */
export type ToolInputSchema = Record<string, ZodType>;
/**
 * A fully-declarative description of one MCP tool.
 *
 * Fields map 1-to-1 to the arguments of server.registerTool():
 *   server.registerTool(name, { description, inputSchema, annotations }, wrappedHandler)
 *
 * The `wrap` field controls which safe-handler wrapper is applied by
 * registerFromEntries(). Defaults to 'tracked' when omitted.
 */
export interface ToolEntry {
    /** MCP tool name, e.g. 'generate_batch_script'. snake_case. */
    name: string;
    /** Human-readable description surfaced to LLMs. */
    description: string;
    /** Zod .shape or plain Zod object to use as MCP inputSchema. */
    schema: ToolInputSchema;
    /** The actual handler. Receives raw args, returns MCP ToolResult.
     *  Use `as <InputType>` cast at call site — kept loose to avoid per-entry boilerplate. */
    handler: (args: any) => Promise<ToolResult>;
    /** MCP tool annotations (readOnlyHint, destructiveHint, title, …). */
    annotations?: Record<string, unknown>;
    /**
     * Which safe-handler wrapper to apply.
     * - 'tracked'  → safeTracked (free tier, usage tracking)    [default]
     * - 'licensed' → safeLicensed (requires paid plan)
     * - 'safe'     → safe (no license/tracking — for infra/admin tools)
     * - 'none'     → raw handler with no wrapper (rare — test only)
     */
    wrap?: 'tracked' | 'licensed' | 'safe' | 'none';
    /**
     * Optional Zod output schema for MCP outputSchema validation.
     * When provided, passed as `outputSchema` to server.registerTool().
     */
    outputSchema?: any;
    /** Optional grouping label for documentation / filtering. */
    group?: string;
}
/**
 * Registers every entry in `entries` onto the MCP server.
 * Applies the safe-handler wrapper declared in entry.wrap (defaults to 'tracked').
 *
 * Drop-in replacement for calling register*Tools(server) on each migrated file.
 */
export declare function registerFromEntries(server: McpServer, entries: ToolEntry[]): void;
//# sourceMappingURL=tool-entry.d.ts.map