import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
/** Coerce string→number for numeric params while rejecting NaN/empty strings. */
export declare const zNum: () => z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>]>>;
export declare const SYMBOL_TOOLS: Set<string>;
/**
 * Build an H11 hint string from a list of FileEntry-like records. Returns
 * null when no hint is needed. Separated from `checkTextStubHint` so the
 * purely-deterministic core can be unit-tested without spinning up a real
 * index.
 *
 * A file is counted as a "stub" when its language appears in STUB_LANGUAGES
 * (queried dynamically). Languages like `kotlin` that have a real extractor
 * are automatically excluded because they live outside STUB_LANGUAGES, so
 * H11 no longer fires for Kotlin-heavy repos.
 */
export declare function buildH11Hint(files: ReadonlyArray<{
    path: string;
    language: string;
}>): string | null;
/** Get a registered tool handle by name (for testing and describe_tools reveal) */
export declare function getToolHandle(name: string): any;
export declare function enableToolByName(name: string): boolean;
/**
 * Enable framework-specific tool bundle — called after indexing when framework is detected.
 * Idempotent: safe to call multiple times. Only enables tools that exist and are currently disabled.
 */
export declare function enableFrameworkToolBundle(framework: string): string[];
/**
 * Detect project type at CWD and return list of tools that should be auto-enabled.
 * Returns empty array if no framework-specific tools apply.
 * Exported for unit testing.
 */
export declare function detectAutoLoadTools(cwd: string): Promise<string[]>;
export declare function detectAutoLoadToolsCached(cwd: string): Promise<string[]>;
export interface ToolDefinition {
    name: string;
    description: string;
    schema: Record<string, z.ZodTypeAny>;
    handler: (args: Record<string, unknown>) => Promise<unknown>;
    /** Category for tool discovery grouping */
    category?: ToolCategory;
    /** Keywords for discover_tools search — helps LLM find the right tool */
    searchHint?: string;
    /** Output schema for structured validation and documentation (optional) */
    outputSchema?: z.ZodTypeAny;
    /**
     * Language gate: this tool is only enabled when the project contains
     * files of the given language. E.g. "python" disables the tool when
     * no .py files exist. Checked at server startup against process.cwd().
     */
    requiresLanguage?: "python" | "php" | "kotlin";
}
export declare const OutputSchemas: {
    /** search_symbols, cross_repo_search */
    readonly searchResults: z.ZodString;
    /** get_file_tree */
    readonly fileTree: z.ZodString;
    /** get_file_outline */
    readonly fileOutline: z.ZodString;
    /** get_symbol */
    readonly symbol: z.ZodNullable<z.ZodString>;
    /** find_references */
    readonly references: z.ZodString;
    /** trace_call_chain */
    readonly callTree: z.ZodString;
    /** impact_analysis */
    readonly impactAnalysis: z.ZodString;
    /** codebase_retrieval */
    readonly batchResults: z.ZodString;
    /** discover_tools */
    readonly toolDiscovery: z.ZodObject<{
        query: z.ZodString;
        matches: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            category: z.ZodString;
            description: z.ZodString;
            is_core: z.ZodBoolean;
        }, z.core.$strip>>;
        total_tools: z.ZodNumber;
        categories: z.ZodArray<z.ZodString>;
    }, z.core.$strip>;
    /** get_call_hierarchy */
    readonly callHierarchy: z.ZodString;
    /** analyze_complexity */
    readonly complexity: z.ZodString;
    /** find_dead_code */
    readonly deadCode: z.ZodString;
    /** find_clones */
    readonly clones: z.ZodString;
    /** scan_secrets */
    readonly secrets: z.ZodString;
    /** go_to_definition */
    readonly definition: z.ZodNullable<z.ZodString>;
    /** get_type_info */
    readonly typeInfo: z.ZodUnion<readonly [z.ZodObject<{
        type: z.ZodString;
        documentation: z.ZodOptional<z.ZodString>;
        via: z.ZodLiteral<"lsp">;
    }, z.core.$strip>, z.ZodObject<{
        via: z.ZodLiteral<"unavailable">;
        hint: z.ZodString;
    }, z.core.$strip>]>;
    /** rename_symbol */
    readonly renameResult: z.ZodObject<{
        files_changed: z.ZodNumber;
        edits: z.ZodArray<z.ZodObject<{
            file: z.ZodString;
            changes: z.ZodNumber;
        }, z.core.$strip>>;
    }, z.core.$strip>;
    /** usage_stats */
    readonly usageStats: z.ZodObject<{
        report: z.ZodString;
    }, z.core.$loose>;
    /** list_repos */
    readonly repoList: z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodObject<{
        name: z.ZodString;
    }, z.core.$loose>>]>;
};
export type ToolCategory = "indexing" | "search" | "outline" | "symbols" | "graph" | "lsp" | "architecture" | "context" | "diff" | "analysis" | "patterns" | "conversations" | "security" | "reporting" | "cross-repo" | "nestjs" | "navigation" | "session" | "meta" | "discovery";
/** Usage-critical tools that must never require discover_tools/describe_tools. */
export declare const ALWAYS_VISIBLE_TOOL_NAMES: readonly ["search_text", "get_file_outline", "plan_turn", "index_file", "search_symbols", "get_file_tree", "search_all_conversations", "codebase_retrieval"];
/** Tools visible in ListTools — core (high usage) + direct-use (agents call without discovery) */
export declare const CORE_TOOL_NAMES: Set<string>;
/** Get all tool definitions (exported for testing) */
export declare function getToolDefinitions(): readonly ToolDefinition[];
/**
 * Extract structured param info from a ToolDefinition's Zod schema.
 */
export declare function extractToolParams(def: ToolDefinition): Array<{
    name: string;
    required: boolean;
    description: string;
}>;
export declare function getToolDefinition(name: string): ToolDefinition | undefined;
interface DescribeToolsResult {
    tools: Array<{
        name: string;
        category: string;
        description: string;
        is_core: boolean;
        params: Array<{
            name: string;
            required: boolean;
            description: string;
        }>;
    }>;
    not_found: string[];
}
/** Reset the describeTools cache. Test-only — not exported via index. */
export declare function resetDescribeToolsCacheForTesting(): void;
/**
 * Return full param details for a specific list of tool names.
 * Unknown names are collected in not_found.
 */
export declare function describeTools(names: string[]): DescribeToolsResult;
/**
 * Search tool catalog by keyword. Returns matching tools with descriptions.
 * Uses simple token matching against name + description + searchHint + category.
 */
export declare function discoverTools(query: string, category?: string): {
    query: string;
    matches: Array<{
        name: string;
        category: string;
        description: string;
        is_core: boolean;
    }>;
    total_tools: number;
    categories: string[];
};
export declare function registerTools(server: McpServer, options?: {
    deferNonCore?: boolean;
    projectRoot?: string;
}): void;
export {};
//# sourceMappingURL=register-tools.d.ts.map