Package akka.javasdk.agent
Class McpToolCallExecutionException
Object
Throwable
Exception
RuntimeException
akka.javasdk.agent.McpToolCallExecutionException
- All Implemented Interfaces:
Serializable
Exception thrown when an MCP (Model Context Protocol) tool call fails during execution.
This exception is thrown by agents when they attempt to call MCP tools from remote servers and the tool execution fails. It provides detailed information about which tool and endpoint failed to help with debugging and error handling.
Context Information: The exception includes the tool name and endpoint URL to help identify the source of the failure. This is particularly useful when agents are using multiple MCP servers or when debugging tool integration issues.
Error Handling: Agents can catch this exception in their onFailure
handlers to provide fallback behavior or alternative responses when MCP tools are unavailable.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMcpToolCallExecutionException
(String message, String toolName, String endpoint, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionReturns the MCP endpoint where the failure occurred.Returns the name of the MCP tool that failed to execute.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
McpToolCallExecutionException
-
-
Method Details
-
getToolName
Returns the name of the MCP tool that failed to execute.- Returns:
- the tool name
-
getEndpoint
Returns the MCP endpoint where the failure occurred.- Returns:
- the endpoint
-