|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Wraps a remote MCP server tool as a local Tool. More...
#include <client.h>
Public Member Functions | |
| std::string | execute (const json &arguments) override |
| Execute the tool on the MCP server. | |
| ChatTool | get_definition () const override |
| Get the tool definition metadata. | |
| std::string | get_name () const override |
| Get the tool name. | |
| MCPTool (const std::string &server_url, const std::string &name, const std::string &description, const json &input_schema) | |
| HTTP-mode constructor. | |
| MCPTool (std::shared_ptr< detail::StdioSession > session, const std::string &name, const std::string &description, const json &input_schema) | |
| stdio-mode constructor. | |
Wraps a remote MCP server tool as a local Tool.
MCPTool implements the Tool interface by forwarding execute() calls through the owning transport (HTTP or stdio). Created automatically by MCPClient::get_tools().
| neograph::mcp::MCPTool::MCPTool | ( | const std::string & | server_url, |
| const std::string & | name, | ||
| const std::string & | description, | ||
| const json & | input_schema | ||
| ) |
| neograph::mcp::MCPTool::MCPTool | ( | std::shared_ptr< detail::StdioSession > | session, |
| const std::string & | name, | ||
| const std::string & | description, | ||
| const json & | input_schema | ||
| ) |
stdio-mode constructor.
The MCPTool keeps the session alive — the subprocess stays up as long as any tool instance holds a reference to it.
|
overridevirtual |
Execute the tool on the MCP server.
| arguments | JSON object containing the tool's input parameters. |
Implements neograph::Tool.
|
overridevirtual |
Get the tool definition metadata.
Returns a ChatTool containing the tool's name, description, and JSON Schema for its parameters. This is sent to the LLM so it can decide when to call the tool.
Implements neograph::Tool.
|
inlineoverridevirtual |
Get the tool name.
Implements neograph::Tool.