Skip to main content
A toolset lists what scripts may call. Registering it connects to its MCP servers, pins the schemas of their tools, and returns the generated declarations. See Tools and toolsets for how calls are made.
McpServer[]
MCP servers over streamable HTTP. name is the namespace of their tools in rewind:tools (github.list_issues); policies sets the policy of some of their tools, by the name the server gives them.
HostTool[]
Your own tools, executed by your worker. A name group.tool puts the tool in the group namespace (crm.find_customer). inputSchema is required and validated before each call; outputSchema types the result in the declarations, and is not validated.
{ allow: string[]; policy?: ToolPolicy }
Enables the built-in http tool, and fetch in scripts, for these hosts only. *.example.com allows the subdomains.
string[]
The workflows scripts may start: "triage" pins its latest version, "triage@9f2c4e1a07b3" one version.
string
Derives the toolset from a registered one: its servers, tools and workflows are kept as pinned, and workflows adds or pins workflows again. mcp, host and http must then be empty.
Credentials
The MCP servers’ credentials, by server name: the headers sent to each server, such as Authorization. Used to list their tools, then kept as the toolset’s. They are not part of its id.
A toolset is content-addressed: registering the same toolset again returns the same id, so registering it at every start of your harness is fine.

Policies

Each tool has a policy. Every field is optional.

Declarations for the model

toolset.declarations holds two renderings of the toolset’s rewind:tools module: prompt, one compact line per tool for the model’s system prompt, and dts, the TypeScript declarations scripts are checked against.
A toolset too large for the prompt can be searched instead: give the model the agent tool search_tools, or search yourself:

Credentials

Credentials are set per toolset, per end user and toolset, or per run. A call uses the run’s if it has some, then its namespace’s, then the toolset’s; never merged.
Setting credentials replaces the previous ones at that level. When a token expires during a long pause, the call is parked and you get the webhook credentials.expired. Set new credentials at the same level, and the call is sent again with the same idempotency key.