Open Agent Loops
API Reference

skillResourceTool

@open-agent-loops/core


function skillResourceTool(registry): Tool;

Defined in: skills/skill-tool.ts:106

Build the skill_resource tool bound to a SkillRegistry: Level 3 disclosure, loading one of a skill's bundled resources on demand.

Parameters

ParameterTypeDescription
registrySkillRegistryThe SkillRegistry whose resources can be loaded.

Returns

Tool

A Tool named skill_resource ready to pass to the agent loop.

Remarks

Add it alongside skillTool when any of your skills declare resources:

tools: [skillTool(skills), skillResourceTool(skills), ...skills.tools()]

The model only learns a resource exists from the manifest skillTool appends to a skill's instructions, then calls skill_resource({ skill, name }) to pull its content. The load thunk runs only here, so an unused resource costs nothing — not even the read. An unknown skill or resource throws (listing what is available); the loop turns that into the usual isError tool result the model can recover from.

See

On this page