client/McpApplicationErrorException.java

langchain4j · langchain4j-mcp/src/main/java/dev/langchain4j/mcp/client/McpApplicationErrorException.java · java · Apache-2.0
ai, tag:knn-classified

Exception representing an MCP server reported tool execution error, visible to LLM.

// Source: https://github.com/langchain4j/langchain4j | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package dev.langchain4j.mcp.client;

import dev.langchain4j.exception.LlmVisibleToolExecutionException;
import dev.langchain4j.exception.ToolErrorVisibleToLlm;
import dev.langchain4j.exception.ToolExecutionException;

/**
 * An error that an MCP server reported inside an otherwise successful tool result, by setting
 * {@code isError} to {@code true}. The MCP specification calls this a "Tool Execution Error"
 * and defines it as the way a server tells the <i>model</i> that a tool did not succeed,
 * as opposed to a protocol error, which indicates that the call itself went wrong.
 *

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key