Create Plan
create_planWrite down a sequence of tool calls to be run together, later, as one thing. IT DOES NOTHING UNTIL A PERSON CONFIRMS IT -- creating a plan writes nothing to the CRM and starts nothing, and there is no tool that confirms one. USE THIS WHEN THE WORK SHOULD BE REPEATABLE OR CONDITIONAL. A plan can be fired again without being rewritten, and a step can carry a CONDITION on what an earlier step returned -- which is how 'create the contact if the account exists, and a lead if it does not' is said. For work somebody wants done once and now, create the run and dispatch it directly instead; a plan is the heavier answer. EACH STEP is {tool, arguments, title}, exactly the call you would have made, plus an optional when. A step naming a tool you cannot call is refused when the plan is written rather than when it runs. when IS {step, field, op, value}: step is the INDEX of an EARLIER step, field a key of what that step returned, op one of eq, neq, gt, gte, lt, lte, exists, absent. There is no and/or -- one condition per step. A step whose condition does not hold is SKIPPED and the plan carries on; it is not a failure. THE COMMONEST GUARD reads count_crm_records, which returns matched -- so {step: 0, field: 'matched', op: 'gt', value: 0} means 'if that search found anything'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | What a person calls this plan. Required unless request_text is given; a plan fired repeatedly wants one. | |
| steps | Yes | The calls, in order. | |
| staged | No | A staged plan: its runs stage their results and write nothing, and the firing writes every record once when the last run finishes, skipping a field the CRM changed since it was staged. Its steps may be the enrichment, verification, job change and assignment runs, and dispatch_run. | |
| request_text | No | What was asked for, in the person's own words. This is what a reviewer reads to answer why a queued change is in front of them. | |
| connection_id | Yes | The CRM connection. Call list_crm_connections first. | |
| interpretation | No | How you read the request, in one or two sentences. |