/** * Custom Tool Registration API * * Clean API to register custom tools (local + npm) with minimal friction. */ import type { PraisonTool, ToolExecutionContext, ToolParameterSchema } from '../registry/types'; export interface CustomToolConfig { /** Unique tool identifier */ id: string; /** Display name */ name: string; /** Tool description (used by LLM) */ description: string; /** Parameter schema */ parameters?: ToolParameterSchema; /** Execute function */ execute: (input: TInput, context?: ToolExecutionContext) => Promise | TOutput; /** Tags for categorization */ tags?: string[]; /** Documentation slug */ docsSlug?: string; } /** * Register a custom tool with the global registry */ export declare function registerCustomTool(config: CustomToolConfig): PraisonTool; /** * Create a custom tool without registering it */ export declare function createCustomTool(config: CustomToolConfig): PraisonTool; /** * Register a tool from an npm package */ export declare function registerNpmTool(packageName: string, toolName?: string): Promise>; /** * Register a tool from a local file path */ export declare function registerLocalTool(filePath: string, toolName?: string): Promise>; /** * Decorator for creating tools from class methods */ export declare function Tool(config: Omit): (target: unknown, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;