Dive

Control steps

ask

Asks the person running the plan a question and uses their answer.

When to use it

  • For a value only the person running the plan knows, or a confirmation before an irreversible action.
  • Not for anything a tool can look up or a gate can judge.

How it works

  • outputSchema must be a flat object of strings, numbers, booleans and enums.
  • The terminal, the workbench and MCP clients each show the question their own way.
  • whenUnanswered decides what happens when nobody can answer, such as in CI: fail (the default) or default, which uses default.

Input

The fallback answer used when whenUnanswered is 'default', and the answer a host offers prefilled. Must conform to outputSchema. May use templates.

outputSchemaanyrequired

JSON Schema for the answer. Must be type object whose properties are all primitives (string, number, integer, boolean) or string enums — no nested objects or arrays. Give every property a description written as a question: it is what the user reads for that field. May be a template ({{E1.schema}}) or contain templates (an enum from {{E1.names}}); it is then checked when the step runs.

promptstringrequired

The question, as the user will see it. May use templates like {{E0.candidates}}.

whenUnansweredenum<string>

What to do when nobody can answer (headless run, client without elicitation support, user declined). 'fail' (the default) fails the step; 'default' falls back to the default value.

Available options: fail, default

Result

Later steps read these as {{<step id>.<field>}}.

answerobject

The answer, matching outputSchema.

answeredboolean

False when the person declined or nobody could be asked.

reasonstring

When answered is false: declined or unavailable.

- id: E1
  tool_name: ask
  input:
    prompt: "{{input.prompt}}"
    outputSchema: "{{input.outputSchema}}"
{
  "answer": {
    "repo": "loon-rocks/dive"
  },
  "answered": false,
  "reason": "unavailable"
}