Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
tool_executor.cpp File Reference

ToolExecutor implementation. More...

#include <entropic/mcp/tool_executor.h>
#include <entropic/mcp/tool_result_classify.h>
#include <entropic/mcp/utf8_sanitize.h>
#include <entropic/types/logging.h>
#include <nlohmann/json.hpp>
#include <algorithm>
#include <chrono>
#include <memory>
#include <optional>
Include dependency graph for tool_executor.cpp:

Go to the source code of this file.

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Functions

static std::string entropic::check_required_fields (const nlohmann::json &schema, const nlohmann::json &args)
 Check required fields are present.
 
static std::string entropic::check_enum (const std::string &key, const nlohmann::json &allowed, const nlohmann::json &val)
 Check one property's enum and type constraints.
 
static std::string entropic::check_type (const std::string &key, const std::string &type, const nlohmann::json &val)
 Check a single value against a type constraint.
 
static std::string entropic::check_property_constraints (const std::string &key, const nlohmann::json &prop, const nlohmann::json &val)
 Check one property's enum and type constraints.
 
static std::string entropic::validate_tool_args (const std::string &schema_json, const nlohmann::json &args)
 Validate tool arguments against the tool's JSON Schema.
 
static std::string entropic::parse_tool_result_text (const std::string &result_json)
 Extract the "result" text from an MCP result JSON envelope.
 
static ToolResultKind entropic::classify_tool_result (const std::string &content)
 Classify a tool result by its content (error/empty/ok).
 
static std::vector< std::string > entropic::extract_pipeline_stages (const nlohmann::json &result_json)
 Extract directives from ServerResponse JSON and process them.
 
static std::unique_ptr< Directiveentropic::build_complete_directive (const nlohmann::json &result_json)
 Build a typed Directive from a directive-descriptor JSON.
 
static std::unique_ptr< Directiveentropic::build_directive (const nlohmann::json &d, const nlohmann::json &result_json)
 Build a Directive from a parsed directive + result JSON.
 
static std::optional< std::pair< nlohmann::json, nlohmann::json > > entropic::extract_directive_array (const std::string &raw_result)
 Pull the "directives" array out of a tool ServerResponse JSON.
 

Variables

static auto logger = entropic::log::get("mcp.tool_executor")
 

Detailed Description

ToolExecutor implementation.

Version
2.0.6-rc16

Definition in file tool_executor.cpp.

Variable Documentation

◆ logger

auto logger = entropic::log::get("mcp.tool_executor")
static

Definition at line 20 of file tool_executor.cpp.