v1.4.7
Enhancement
Dynamic tool management at runtime via AgentContext
Added addTool() and removeTool() methods to AgentContext, allowing tools to be added or removed dynamically during agent execution. This enables more flexible workflows where the available toolset can change based on context or intermediate results.
Changes
AgentContext::addTool()— register a new tool so it is included in subsequent API callsAgentContext::removeTool()— remove a tool so it is excluded from future API calls- Added type annotations to the
toolsproperty for better IDE support - Updated
ToolExecutionTraitto source tools from the context's current tool list
Upgrade
composer update claude-php/agentNo breaking changes. Drop-in replacement for v1.4.6.