pick_first
Rejoin two branches: takes the outputs of several conditional steps and emits the first one that actually ran.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pick_first"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| values | No | the branches to choose between, in preference order. Wire one output from each arm. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| fallback | No | what to emit when NO branch ran. Leave empty to make that an error instead, which is usually what you want, because silently continuing with nothing is how a pipeline reports a result it never computed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | which branch it came from (0 = the first wired) | |
| value | Yes | the first branch that produced anything | |
| record | Yes | the same value when it is a record, so it can drive a downstream $subject | |
| ranCount | Yes | how many branches produced anything. More than 1 means the conditions were not exclusive |