FoundationHazelJS
Tool
A schema-defined function or API adapter the runtime can execute on an agent’s behalf.
- Authors
- editorial-team
- Published
- Last reviewed
Direct answer
A schema-defined function or API adapter the runtime can execute on an agent’s behalf.
Plain language
Tools are the verbs—search, fetch, create—that the agent is allowed to use.
Technical explanation
In HazelJS: @Tool metadata (name, schema, side-effect class) registered on ToolRegistry; executed by the host ToolExecutor—never by the model directly. May originate from MCP servers or Skillgate skills.
Example
@Tool create_draft_pr({ repo, branch, title }) with sideEffect=write and an idempotency key, invoked only via AgentRuntime.