// ===================================================== // Interfaces: MCP Tool // Modulo: MGN-022 // Version: 1.0.0 // ===================================================== import { McpContext } from './mcp-context.interface'; export interface JSONSchema { type: string; properties?: Record; required?: string[]; items?: JSONSchemaProperty; description?: string; } export interface JSONSchemaProperty { type: string; description?: string; format?: string; enum?: string[]; minimum?: number; maximum?: number; default?: any; items?: JSONSchemaProperty; properties?: Record; required?: string[]; } export interface RateLimitConfig { maxCalls: number; windowMs: number; perTenant?: boolean; } export type ToolCategory = | 'products' | 'inventory' | 'orders' | 'customers' | 'fiados' | 'system'; export interface McpToolDefinition { name: string; description: string; parameters: JSONSchema; returns: JSONSchema; category: ToolCategory; permissions?: string[]; rateLimit?: RateLimitConfig; } export type McpToolHandler = ( params: TParams, context: McpContext ) => Promise; export interface McpToolProvider { getTools(): McpToolDefinition[]; getHandler(toolName: string): McpToolHandler | undefined; }