Skip to content

v0.7.0

Choose a tag to compare

@dalehurley dalehurley released this 18 Mar 05:30
· 2 commits to main since this release

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 identifiers
  • Skill::hasToolRestrictions() — returns true when the skill restricts tool usage
  • HasAgentSkills::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-empty

Full Changelog: v0.6.2...v0.7.0