← All help topics

Recipes: tools that run other tools

A recipe is a tool that runs other tools, one after another, and can combine their results. Any tool can be a step: built-in tools, your own, and tools from connected servers.

Recipes need a license (the trial includes them).

Recipes are written in a pack file (see Writing packs by hand).

Example

[[tool]]
name = "morning_brief"
description = "Today's date and the weather, in one summary"
read_only = true
format = """
{{ steps.now.text }}

Weather: {{ steps.weather.text }}
"""

[[tool.steps]]
id = "now"
tool = "time_now"

[[tool.steps]]
id = "weather"
tool = "weather"
args = { city = "{{ city }}" }

[tool.params]
city = { type = "string", default = "Denver" }

Each step

KeyMeaning
toolThe tool to run.
argsWhat to send it. Templates can use the recipe's parameters and earlier steps.
idA name for the step's result. Default: step1, step2 and so on.
continue_on_errortrue to keep going if this step fails. Normally the recipe stops.

Later steps and format can use steps.ID.text (what the step returned), steps.ID.json (its data, if any) and steps.ID.ok (whether it worked).

Permissions

A recipe is as careful as its most careful step. If any step would ask, you're asked once for the whole recipe, and the question lists the steps. If any step is blocked, the recipe is blocked. A recipe can't run itself.