NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::ToolRequestRefusal Class Referenceabstract

What an exception says when the call it ended is known not to have run: the service that hosts the tool refused the request before executing it, such as an MCP JSON-RPC protocol error for invalid params or a gRPC INVALID_ARGUMENT. More...

#include <tool_execution.h>

Inheritance diagram for neograph::ToolRequestRefusal:
[legend]

Public Member Functions

virtual bool retryable () const noexcept=0
 Whether sending the same request again may succeed.
 

Detailed Description

What an exception says when the call it ended is known not to have run: the service that hosts the tool refused the request before executing it, such as an MCP JSON-RPC protocol error for invalid params or a gRPC INVALID_ARGUMENT.

The outcome is known, so the ToolExecutionController reports a plain failed result that is not effect-uncertain whatever the tool's execution policy says, where any other exception from a started call is reconciliation_required unless the policy rules out an effect. The exception's message is the text the model reads.

ToolRequestRejected is the ready-made exception. An exception type that has a base of its own to keep, such as mcp::MCPError, adds this interface instead. The node failure classifier reads such an exception as an ordinary failure that is retried only when retryable() is true.

Definition at line 134 of file tool_execution.h.

Member Function Documentation

◆ retryable()

virtual bool neograph::ToolRequestRefusal::retryable ( ) const
pure virtualnoexcept

Whether sending the same request again may succeed.

A request refused for its content does not: the model has to change it.

Implemented in neograph::acp::ACPClientRefusal, and neograph::ToolRequestRejected.


The documentation for this class was generated from the following file: