Overview
profClaw’s tool system is fully extensible. You can register custom tools that the AI can call just like built-in tools. Custom tools go through the same schema validation, security checks, and tier routing as built-in tools. There are two ways to add custom tools:- Plugin tools - Packaged in a plugin with a
package.jsonand fullToolDefinition - Skill-based tools - Lightweight command dispatch defined in a
SKILL.mdfile
Plugin Tool (Full SDK)
Create a plugin with a tool definition:index.ts:
Tool Definition Structure
Unique tool name. Use
snake_case. Must not conflict with built-in tool names.Description shown to the AI model. Be specific about when to use this tool and what it returns.
Category:
execution, filesystem, web, data, system, profclaw, memory, browser, custom.Security level:
safe, moderate, dangerous. Affects approval requirements.Zod schema for parameter validation. Fields with
.describe() become parameter descriptions for the AI.Async function
(context, params) => Promise<ToolResult>. Receives a ToolExecutionContext with workdir, security policy, and session manager.Which model tier receives this tool:
essential, standard, full.Optional availability check. Return
{ available: false, reason: "..." } to hide the tool when its dependencies aren’t configured.Force approval requests regardless of security mode.
Rate limit config:
{ maxCalls: 10, windowMs: 60000 }.ToolResult Format
Yourexecute function must return a ToolResult:
ToolExecutionContext
Thecontext parameter gives you access to:
Skill-Based Command Dispatch
For simpler cases, you can define a command in aSKILL.md file that dispatches to an existing tool:
/my-command arg1 arg2, it calls exec with the raw args as the command.
Tool Tier Assignment
Custom tools default to thefull tier. To make your tool available to smaller models, set a lower tier: