Skip to main content
A tool describes a function your agent can call: its name, the parameters it takes, when it should be invoked, and what a successful result looks like. Scope a tool to one agent with agent, or omit it for a project-wide tool. A tool does one of two jobs, depending on the agent it belongs to:
  • Grading and mocking, for a connected agent. Your agent runs on another platform (for example provider: vapi) or your own stack (provider: custom) and calls its own tools. Roark uses the tool’s description to grade and mock tool calls in simulations: it checks the agent reached for the right tool at the right moment with sensible arguments, and it stands in a mock result so the conversation can carry on.
  • A tool the agent runs, for an agent built on Roark. A tool scoped with agent: to an agent with provider: roark, with a handler, is a tool that agent actually calls mid-call. See Tools for an agent built on Roark.
For a connected agent, a tool definition is grading and mock metadata, not an integration. In a simulation Roark scores whether your agent called the tool correctly and returns a mock result so the call can continue; it does not call your backend, and defining the tool changes nothing about how your live agent runs. For an agent built on Roark, the tool’s handler runs: Roark calls your HTTP endpoint, or the connected calendar, when the agent uses the tool.

Parameters

parameters is a flat map of parameter name to its type, one of string, number, or boolean. It describes the arguments the agent is expected to pass, so Roark can check the call carried the right ones:

Handler

handler says how the tool executes. For an agent built on Roark, Roark runs it when the agent calls the tool. For a connected agent, Roark stores it with the tool but does not call it. It is optional, and there are two types: http and calendar.

HTTP handler

A public endpoint the agent’s runtime calls, mid-call, with the tool’s arguments:
url, header values, and body are templates over {{args.<parameter>}} and {{session.id}}. With no body, a POST, PUT, or PATCH sends the arguments as the body, and a GET or DELETE sends them as query parameters.

Calendar handler

One action on a calendar an agent built on Roark books against. Unlike http, Roark executes this one itself, against a calendar it holds the credential for. Each calendar tool is one action, so a front desk that checks availability, books, and cancels is three kind: tool resources naming the same connection.
A calendar tool takes the arguments Roark defines for its operation, so it does not declare parameters, changesData, or responseFields. It keeps messages.

Tools for an agent built on Roark

Scope a tool to an agent with provider: roark with agent: and give it a handler, and it becomes a tool that agent calls:
  • A tool edit publishes a new agent version. roark config diff shows an edited tool as an update to its agent, and apply publishes a version that runs the edited tool.
  • Tools added in Roark stay on the agent. Config removes a tool from the agent only when the bundle scopes it to another agent, or when a pruning bundle drops it.
  • Project-wide tools are not attached by config. A tool without agent: is not added to the agent’s version. Attaching project-wide tools is not configurable yet.
For the full field reference of every kind, see the Config DSL reference schema.