mcp-ai-agent-guidelines
Version:
A comprehensive Model Context Protocol server providing advanced tools, resources, and prompts for implementing AI agent best practices
73 lines • 2.53 kB
TypeScript
/**
* A2A-specific error types for tool orchestration
*
* Extends the base error system with specialized errors for:
* - Tool invocation failures
* - Recursion depth violations
* - Timeout enforcement
* - Orchestration workflow errors
*/
import { OperationError } from "./errors.js";
/**
* Error thrown when a tool invocation fails
*/
export declare class ToolInvocationError extends OperationError {
readonly toolName: string;
constructor(toolName: string, message: string, context?: Record<string, unknown>);
}
/**
* Error thrown when recursion depth limit is exceeded
*/
export declare class RecursionDepthError extends OperationError {
readonly currentDepth: number;
readonly maxDepth: number;
constructor(currentDepth: number, maxDepth: number, context?: Record<string, unknown>);
}
/**
* Error thrown when a tool execution times out
*/
export declare class ToolTimeoutError extends OperationError {
readonly toolName: string;
readonly timeoutMs: number;
constructor(toolName: string, timeoutMs: number, context?: Record<string, unknown>);
}
/**
* Error thrown when the entire chain execution times out
*/
export declare class ChainTimeoutError extends OperationError {
readonly chainTimeoutMs: number;
readonly toolsCompleted: number;
constructor(chainTimeoutMs: number, toolsCompleted: number, context?: Record<string, unknown>);
}
/**
* Error thrown when a tool is not found in the registry
*/
export declare class ToolNotFoundError extends OperationError {
readonly toolName: string;
constructor(toolName: string, context?: Record<string, unknown>);
}
/**
* Error thrown when a tool is not allowed to invoke another tool
*/
export declare class ToolInvocationNotAllowedError extends OperationError {
readonly callerTool: string;
readonly targetTool: string;
constructor(callerTool: string, targetTool: string, context?: Record<string, unknown>);
}
/**
* Error thrown when orchestration workflow execution fails
*/
export declare class OrchestrationError extends OperationError {
readonly workflowName?: string;
constructor(message: string, context?: Record<string, unknown> & {
workflowName?: string;
});
}
/**
* Error thrown when execution strategy is invalid or cannot be executed
*/
export declare class ExecutionStrategyError extends OperationError {
readonly strategy: string;
constructor(strategy: string, message: string, context?: Record<string, unknown>);
}
//# sourceMappingURL=a2a-errors.d.ts.map