import type { ToolParameter, ToolResult } from '../types/index.js'; // 工具类别 export type ToolCategory = 'core' | 'filesystem' | 'shell' | 'git' | 'web' | 'database'; // 工具元数据 export interface ToolMetadata { name: string; category: ToolCategory; description: string; // 简短描述,用于搜索结果展示 keywords: string[]; // 搜索关键词 deferLoading: boolean; // true = 延迟加载,false = 始终加载 } // 扩展后的工具定义(包含元数据) export interface ToolWithMetadata { name: string; description: string; parameters: Record; execute: (params: Record) => Promise; metadata: ToolMetadata; } // 搜索结果 export interface ToolSearchResult { name: string; description: string; category: ToolCategory; score: number; }