Repository navigation
v0.7.0
What's New
Skill Tool Restrictions
Skills can now specify which tools an agent should use via the toolIds parameter on Skill. This enables agents to filter their available tools based on active skill restrictions.
New APIs
Skill::$toolIds—array<string>constructor parameter specifying allowed tool identifiersSkill::hasToolRestrictions()— returnstruewhen the skill restricts tool usageHasAgentSkills::allowedToolIds()— returns the union of tool IDs from all loaded skills (empty when no restrictions apply)
Prompt Enhancement
When a loaded skill has toolIds set, the enhanced prompt now includes a "Preferred tools for this skill" section listing the allowed tools, guiding the LLM toward the correct tool set.
Usage
$skill = new Skill(
metadata: $metadata,
instructions: 'Analyse contracts...',
path: '',
toolIds: ['sdk_contract_review', 'sdk_llm', 'sdk_docs_create'],
);
// In your agent's tools() method:
$allowedIds = $this->allowedToolIds();
// Filter tools based on $allowedIds when non-emptyFull Changelog: v0.6.2...v0.7.0