Guides
Create a tool in the workbench
Describe a tool, answer the architect's questions, and save the tool its builder drafts and test-runs.
merged_prs lists the pull requests merged since a date by running the gh CLI.
name: merged_prs
description: Pull requests merged into this repository since a date, as number, title and merge time.
kind: exec
command: gh
args:
- pr
- list
- --state
- merged
- --search
- "merged:>={{input.since}}"
- --json
- number,title,mergedAt
read_only: true
input_schema:
type: object
required: [since]
properties:
since:
type: string
description: The earliest merge date, as YYYY-MM-DDOpen the workbench in tool mode
dive workbench toolDescribe the tool
Say what goes in and what comes back. The drafting architect checks your catalog for a tool that already does it, then asks what it can't settle, one question at a time, each with its guess and how confident it is.
Confirm and build it
Once it can predict your answers, the architect restates what it'll build, including what's out of scope, and sketches the tool in the workspace. Say yes, then tell it to build. The tool drafter writes the file and test-runs it on a sample input once you approve the run:
The result shows in the workspace:
[
{
"mergedAt": "2026-10-09T02:25:01Z",
"number": 147,
"title": "feat!: plans state how they finish with a required finish key…"
},
…
]Set the secrets it needs
A tool that needs a secret, such as an API token, reads it from env as ${NAME}, and the drafter adds a description saying what the value is and where to get it:
env:
HUBSPOT_TOKEN:
value: "${HUBSPOT_TOKEN}"
description: "HubSpot private app token with `crm.objects.contacts.read`. Create one under [Settings › Private apps](https://app.hubspot.com/private-apps)."A test never runs while one of these is unset. The architect lists what's missing, with each description, and waits. Store each value with dive secret set NAME (add --project to keep it to this project), say they're set, and it runs the test again. Say you'd rather skip testing and it offers to save the tool untested.
Save
Press Ctrl+S. Dive writes the file to ./.dive/tools/merged_prs.yaml, and the tool is in your catalog as user__merged_prs.