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

Tool for inspecting the current context window contents. More...

Inheritance diagram for entropic::ContextInspectTool:
Collaboration diagram for entropic::ContextInspectTool:

Public Member Functions

 ContextInspectTool (ToolDefinition def)
 Construct from tool definition.
 
ServerResponse execute (const std::string &args_json) override
 Return context window contents as a message array.
 
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 inspecting the current context window contents.

Returns each message with role, content preview, and estimated token count so the model can assess its own context saturation.

Definition at line 814 of file entropic_server.cpp.

Constructor & Destructor Documentation

◆ ContextInspectTool()

entropic::ContextInspectTool::ContextInspectTool ( ToolDefinition  def)
inlineexplicit

Construct from tool definition.

Parameters
defTool definition loaded from entropic/context_inspect.json.

Definition at line 822 of file entropic_server.cpp.

Member Function Documentation

◆ execute()

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

Return context window contents as a message array.

Parameters
args_jsonJSON with optional "max_messages" (0 = all).
Returns
ServerResponse with [{role, content_preview, token_count_est}].

Delegates to the state provider's get_history callback with the caller-supplied max_messages limit (0 = all messages).

Parameters
args_jsonJSON with optional "max_messages".
Returns
ServerResponse with JSON array of message entries.

Implements entropic::ToolBase.

Definition at line 1113 of file entropic_server.cpp.

◆ required_access_level()

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

Read-only tool requires only READ access.

Returns
MCPAccessLevel::READ.

Reimplemented from entropic::ToolBase.

Definition at line 840 of file entropic_server.cpp.

◆ set_provider()

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

Set state provider pointer.

Parameters
pProvider pointer. @utility
Version
2.0.6-rc16

Definition at line 849 of file entropic_server.cpp.


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