Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::InspectTool Class Reference

Tool for targeted engine state queries. More...

Inheritance diagram for entropic::InspectTool:
Collaboration diagram for entropic::InspectTool:

Public Member Functions

 InspectTool (ToolDefinition def)
 Construct from tool definition.
 
ServerResponse execute (const std::string &args_json) override
 Execute targeted inspection.
 
MCPAccessLevel required_access_level () const override
 Read-only tool requires only READ access.
 
void set_provider (const entropic_state_provider_t *p)
 Set state provider pointer.
 
- Public Member Functions inherited from entropic::ToolBase
 ToolBase (ToolDefinition def)
 Construct with a pre-built definition.
 
const std::string & name () const
 Get the tool name.
 
const ToolDefinitiondefinition () const
 Get the full tool definition.
 
virtual std::string anchor_key (const std::string &args_json) const
 Generate anchor key for this tool result.
 

Additional Inherited Members

- Protected Attributes inherited from entropic::ToolBase
ToolDefinition definition_
 Tool definition.
 

Detailed Description

Tool for targeted engine state queries.

@dg_internal

Version
1.9.12

Definition at line 823 of file entropic_server.cpp.

Constructor & Destructor Documentation

◆ InspectTool()

entropic::InspectTool::InspectTool ( ToolDefinition  def)
inlineexplicit

Construct from tool definition.

Parameters
defTool definition loaded from entropic/inspect.json. @dg_internal
Version
1.9.12

Definition at line 831 of file entropic_server.cpp.

Member Function Documentation

◆ execute()

ServerResponse entropic::InspectTool::execute ( const std::string &  args_json)
overridevirtual

Execute targeted inspection.

Execute targeted inspection query.

Parameters
args_jsonJSON with "target" and optional "key".
Returns
ServerResponse with query result (no directives). @dg_internal
Version
1.9.12
Parameters
args_jsonJSON with "target" and optional "key".
Returns
ServerResponse with query result. @dg_internal
Version
1.9.12

Execute targeted inspection query.

When called with no target (or empty target), returns the full runtime state dump so the model can self-orient without knowing which specific target to query.

gh#33 bug 3 (v2.1.6): guard non-throwing parse against discarded / non-object results so a malformed or no-arg call falls through to the full-state dump rather than crashing the engine with nlohmann::json::type_error.306.

Parameters
args_jsonJSON with optional "target" and "key".
Returns
A ServerResponse with an empty directives array whose result is the full state dump for an absent/empty target, the target's data otherwise, an unknown-target error listing the supported targets, or the provider-not-configured error when no state provider is wired. @req REQ-MCP-024
Version
2.1.6

Implements entropic::ToolBase.

Definition at line 1141 of file entropic_server.cpp.

◆ required_access_level()

MCPAccessLevel entropic::InspectTool::required_access_level ( ) const
inlineoverridevirtual

Read-only tool requires only READ access.

Returns
MCPAccessLevel::READ, relaxing ToolBase's WRITE default because this tool only reads engine state. @req REQ-MCP-011
Version
1.9.12

Reimplemented from entropic::ToolBase.

Definition at line 850 of file entropic_server.cpp.

◆ set_provider()

void entropic::InspectTool::set_provider ( const entropic_state_provider_t p)
inline

Set state provider pointer.

Parameters
pProvider pointer. @utility
Version
1.9.12

Definition at line 859 of file entropic_server.cpp.


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