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

Tool for pruning old messages from context. More...

Inheritance diagram for entropic::PruneContextTool:
Collaboration diagram for entropic::PruneContextTool:

Public Member Functions

 PruneContextTool (ToolDefinition def)
 Construct from tool definition.
 
ServerResponse execute (const std::string &args_json) override
 Execute context pruning.
 
- 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.
 
virtual MCPAccessLevel required_access_level () const
 Minimum access level required to execute this tool.
 

Additional Inherited Members

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

Detailed Description

Tool for pruning old messages from context.

Definition at line 520 of file entropic_server.cpp.

Constructor & Destructor Documentation

◆ PruneContextTool()

entropic::PruneContextTool::PruneContextTool ( ToolDefinition  def)
inlineexplicit

Construct from tool definition.

Parameters
defTool definition loaded from entropic/prune_context.json.
Version
1.8.5

Definition at line 527 of file entropic_server.cpp.

Member Function Documentation

◆ execute()

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

Execute context pruning.

Parse keep_recent and emit prune directive.

Parameters
args_jsonJSON with optional "keep_recent".
Returns
ServerResponse with prune directive.
Version
1.8.5
Parameters
args_jsonJSON with optional "keep_recent".
Returns
ServerResponse with prune_messages directive.

Implements entropic::ToolBase.

Definition at line 546 of file entropic_server.cpp.


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