Loading...
Searching...
No Matches
BinaryNinja::MCP::ToolCall Class Reference

One invocation of a tool, as seen by the tool. More...

Detailed Description

One invocation of a tool, as seen by the tool.

The call's binary view and cancellation state are only available while the tool is running.

Public Member Functions

 ToolCall (BNMcpToolCall *call)
Ref< BinaryNinja::BinaryView > GetBinaryView () const
 Never null while a BinaryView-scoped tool is running.
bool IsCancelled () const
void ReportProgress (double progress, double total, const std::string &message="") const
ArgumentResult< uint64_t > ParseAddress (const rapidjson::Value &value, uint64_t here=0) const
 An address is an expression string.
ArgumentResult< uint64_t > ParseInteger (const rapidjson::Value &value, uint64_t here=0) const
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNMcpToolCall, BNNewMcpToolCallReference, BNFreeMcpToolCall >
 CoreRefCountObject ()
virtual ~CoreRefCountObject ()
BNMcpToolCall * GetObject () const
void AddRef ()
void Release ()
void AddRefForRegistration ()
void ReleaseForRegistration ()
void AddRefForCallback ()
void ReleaseForCallback ()

Additional Inherited Members

Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNMcpToolCall, BNNewMcpToolCallReference, BNFreeMcpToolCall >
std::atomic< int > m_refs
bool m_registeredRef
BNMcpToolCall * m_object

Constructor & Destructor Documentation

◆ ToolCall()

ToolCall::ToolCall ( BNMcpToolCall * call)
explicit

Member Function Documentation

◆ GetBinaryView()

Ref< BinaryView > ToolCall::GetBinaryView ( ) const

Never null while a BinaryView-scoped tool is running.

◆ IsCancelled()

bool ToolCall::IsCancelled ( ) const

◆ ReportProgress()

void ToolCall::ReportProgress ( double progress,
double total,
const std::string & message = "" ) const

◆ ParseAddress()

ArgumentResult< uint64_t > ToolCall::ParseAddress ( const rapidjson::Value & value,
uint64_t here = 0 ) const

An address is an expression string.

An integer is an unsigned integer or an expression string. Expressions are evaluated against the call's binary view, with here as the value of the current address.

◆ ParseInteger()

ArgumentResult< uint64_t > ToolCall::ParseInteger ( const rapidjson::Value & value,
uint64_t here = 0 ) const