Uses of Record Class
dev.langchain4j.mcp.client.McpCallContext
Packages that use McpCallContext
Package
Description
-
Uses of McpCallContext in dev.langchain4j.mcp.client
Subinterfaces with type arguments of type McpCallContext in dev.langchain4j.mcp.clientModifier and TypeInterfaceDescriptioninterfaceA functional interface that supplies HTTP headers for MCP client requests based on the givenMcpCallContext.interfaceA functional interface that supplies_metafields for MCP client requests and notifications based on the givenMcpCallContext.Methods in dev.langchain4j.mcp.client with parameters of type McpCallContextModifier and TypeMethodDescriptiondefault voidMcpClientListener.afterExecuteTool(McpCallContext context, ToolExecutionResult result, Map<String, Object> rawResult) Called after executing a tool if the execution was successful, or if it resulted in an application-level error (but not a protocol-level or communication error).default voidMcpClientListener.afterInitialize(McpCallContext context) Called after the initialize request completes successfully.default voidMcpClientListener.afterPing(McpCallContext context) Called after the ping request completes successfully (the server has responded with a pong).default voidMcpClientListener.afterPromptGet(McpCallContext context, McpGetPromptResult result, Map<String, Object> rawResult) Called after getting a prompt.default voidMcpClientListener.afterPromptsList(McpCallContext context, List<McpPrompt> prompts) Called after listing prompts from the MCP server completes successfully.default voidMcpClientListener.afterResourceGet(McpCallContext context, McpReadResourceResult result, Map<String, Object> rawResult) Called after getting a resource.default voidMcpClientListener.afterResourcesList(McpCallContext context, List<McpResource> resources) Called after listing resources from the MCP server completes successfully.default voidMcpClientListener.afterResourcesSubscribe(McpCallContext context, long subscriptionId, List<String> uris) Called after subscribing to resources completes successfully.default voidMcpClientListener.afterResourceSubscribe(McpCallContext context) Called after subscribing to a resource completes successfully.default voidMcpClientListener.afterResourcesUnsubscribe(@Nullable McpCallContext context, long subscriptionId) Called after unsubscribing from resources completes.default voidMcpClientListener.afterResourceTemplatesList(McpCallContext context, List<McpResourceTemplate> templates) Called after listing resource templates from the MCP server completes successfully.default voidMcpClientListener.afterResourceUnsubscribe(McpCallContext context) Called after unsubscribing from a resource completes successfully.default voidMcpClientListener.afterServerDiscover(McpCallContext context, McpDiscoverResult result) Called after a successfulserver/discoverrequest.default voidMcpClientListener.afterToolsList(McpCallContext context, List<ToolSpecification> tools) Called after listing tools from the MCP server completes successfully.default voidMcpClientListener.beforeExecuteTool(McpCallContext context) Called before executing a tool.default voidMcpClientListener.beforeInitialize(McpCallContext context) Called before sending the initialize request to the MCP server.default voidMcpClientListener.beforePing(McpCallContext context) Called before sending a ping request to the MCP server.default voidMcpClientListener.beforePromptGet(McpCallContext context) Called before getting a prompt.default voidMcpClientListener.beforePromptsList(McpCallContext context) Called before listing prompts from the MCP server.default voidMcpClientListener.beforeResourceGet(McpCallContext context) Called before getting a resource.default voidMcpClientListener.beforeResourcesList(McpCallContext context) Called before listing resources from the MCP server.default voidMcpClientListener.beforeResourcesSubscribe(McpCallContext context, List<String> uris) Called before subscribing to resources via the modernsubscriptions/listenmechanism.default voidMcpClientListener.beforeResourceSubscribe(McpCallContext context) Called before subscribing to a resource.default voidMcpClientListener.beforeResourcesUnsubscribe(@Nullable McpCallContext context, long subscriptionId) Called before unsubscribing from resources via subscription ID.default voidMcpClientListener.beforeResourceTemplatesList(McpCallContext context) Called before listing resource templates from the MCP server.default voidMcpClientListener.beforeResourceUnsubscribe(McpCallContext context) Called before unsubscribing from a resource.default voidMcpClientListener.beforeServerDiscover(McpCallContext context) Called before sending theserver/discoverrequest to the MCP server.default voidMcpClientListener.beforeToolsList(McpCallContext context) Called before listing tools from the MCP server.default voidMcpClientListener.onExecuteToolError(McpCallContext context, Throwable error) Called when a tool execution fails due to a protocol-level or communication error.default voidMcpClientListener.onInitializeError(McpCallContext context, Throwable error) Called when the initialize request fails.default voidMcpClientListener.onPingError(McpCallContext context, Throwable error) Called when the ping request fails (the server didn't send a pong in time or some transport-level issue occurred).default voidMcpClientListener.onPromptGetError(McpCallContext context, Throwable error) Called when getting a prompt fails.default voidMcpClientListener.onPromptsListError(McpCallContext context, Throwable error) Called when listing prompts from the MCP server fails.default voidMcpClientListener.onResourceGetError(McpCallContext context, Throwable error) Called when getting a resource fails.default voidMcpClientListener.onResourcesListError(McpCallContext context, Throwable error) Called when listing resources from the MCP server fails.default voidMcpClientListener.onResourcesSubscribeError(McpCallContext context, Throwable error) Called when subscribing to resources fails, either because the server rejected thesubscriptions/listenrequest or because it never acknowledged it in time.default voidMcpClientListener.onResourceSubscribeError(McpCallContext context, Throwable error) Called when subscribing to a resource fails.default voidMcpClientListener.onResourceTemplatesListError(McpCallContext context, Throwable error) Called when listing resource templates from the MCP server fails.default voidMcpClientListener.onResourceUnsubscribeError(McpCallContext context, Throwable error) Called when unsubscribing from a resource fails.default voidMcpClientListener.onRootsListChanged(McpCallContext context) Called after the client sends anotifications/roots/list_changednotification to the server.default voidMcpClientListener.onServerDiscoverError(McpCallContext context, Throwable error) Called when theserver/discoverrequest fails.default voidMcpClientListener.onToolsListError(McpCallContext context, Throwable error) Called when listing tools from the MCP server fails. -
Uses of McpCallContext in dev.langchain4j.mcp.client.transport
Methods in dev.langchain4j.mcp.client.transport with parameters of type McpCallContextModifier and TypeMethodDescriptiondefault voidMcpTransport.executeOperationWithoutResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.default CompletableFuture<com.fasterxml.jackson.databind.JsonNode> McpTransport.executeOperationWithResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.implementMcpTransport.sendRequest(McpCallContext)instead, which does not expose Jackson types.default voidMcpTransport.sendMessage(McpCallContext context) Sends a message that does not expect a reply - in MCP terms a notification, or a response to a server-initiated request.default CompletableFuture<String> McpTransport.sendRequest(McpCallContext context) Sends a JSON-RPC request and returns the server's response as unparsed JSON text. -
Uses of McpCallContext in dev.langchain4j.mcp.client.transport.docker
Methods in dev.langchain4j.mcp.client.transport.docker with parameters of type McpCallContextModifier and TypeMethodDescriptionvoidDockerMcpTransport.executeOperationWithoutResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useDockerMcpTransport.sendMessage(McpCallContext)instead, which does not expose Jackson types.CompletableFuture<com.fasterxml.jackson.databind.JsonNode> DockerMcpTransport.executeOperationWithResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useDockerMcpTransport.sendRequest(McpCallContext)instead, which does not expose Jackson types.voidDockerMcpTransport.sendMessage(McpCallContext context) DockerMcpTransport.sendRequest(McpCallContext context) -
Uses of McpCallContext in dev.langchain4j.mcp.client.transport.http
Methods in dev.langchain4j.mcp.client.transport.http with parameters of type McpCallContextModifier and TypeMethodDescriptionvoidStreamableHttpMcpTransport.executeOperationWithoutResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useStreamableHttpMcpTransport.sendMessage(McpCallContext)instead, which does not expose Jackson types.CompletableFuture<com.fasterxml.jackson.databind.JsonNode> StreamableHttpMcpTransport.executeOperationWithResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useStreamableHttpMcpTransport.sendRequest(McpCallContext)instead, which does not expose Jackson types.voidStreamableHttpMcpTransport.sendMessage(McpCallContext context) StreamableHttpMcpTransport.sendRequest(McpCallContext context) -
Uses of McpCallContext in dev.langchain4j.mcp.client.transport.stdio
Methods in dev.langchain4j.mcp.client.transport.stdio with parameters of type McpCallContextModifier and TypeMethodDescriptionvoidStdioMcpTransport.executeOperationWithoutResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useStdioMcpTransport.sendMessage(McpCallContext)instead, which does not expose Jackson types.CompletableFuture<com.fasterxml.jackson.databind.JsonNode> StdioMcpTransport.executeOperationWithResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useStdioMcpTransport.sendRequest(McpCallContext)instead, which does not expose Jackson types.voidStdioMcpTransport.sendMessage(McpCallContext context) StdioMcpTransport.sendRequest(McpCallContext context) -
Uses of McpCallContext in dev.langchain4j.mcp.client.transport.websocket
Methods in dev.langchain4j.mcp.client.transport.websocket with parameters of type McpCallContextModifier and TypeMethodDescriptionvoidWebSocketMcpTransport.executeOperationWithoutResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useWebSocketMcpTransport.sendMessage(McpCallContext)instead, which does not expose Jackson types.CompletableFuture<com.fasterxml.jackson.databind.JsonNode> WebSocketMcpTransport.executeOperationWithResponse(McpCallContext context) Deprecated, for removal: This API element is subject to removal in a future version.useWebSocketMcpTransport.sendRequest(McpCallContext)instead, which does not expose Jackson types.voidWebSocketMcpTransport.sendMessage(McpCallContext context) WebSocketMcpTransport.sendRequest(McpCallContext context)
McpTransport.sendMessage(McpCallContext)instead, which is named for what MCP calls it.