@@ -63,6 +63,44 @@ Call `list_workflows` before any start. It is the agent's compatibility check:
6363the response tells the client which workflow keys exist and whether a workflow
6464can run in the current environment.
6565
66+ ## Tool Input Contract
67+
68+ The MCP tool schemas intentionally use Durable Workflow terms instead of
69+ Laravel internals. Keep these fields stable when extending the sample app
70+ server:
71+
72+ | Tool | Stable inputs |
73+ | --- | --- |
74+ | ` list_workflows ` | ` show_recent ` , ` limit ` , and optional ` status ` for recent-run discovery. |
75+ | ` start_workflow ` | ` workflow ` , ordered ` arguments ` , optional ` instance_id ` , ` business_key ` , ` visibility_labels ` , ` memo ` , ` search_attributes ` , and ` duplicate_start_policy ` . |
76+ | ` get_workflow_result ` | ` workflow_id ` , optional ` run_id ` , ` include_recent_history ` , and ` history_limit ` . |
77+ | ` get_workflow_history ` | ` workflow_id ` or ` run_id ` , ` limit ` , and ` include_payloads ` . |
78+
79+ Prefer ` arguments ` over the legacy ` args ` input for new agents. ` arguments `
80+ maps directly to the workflow ` handle() ` argument order, while ` args ` exists
81+ only for older object-shaped callers.
82+
83+ Use caller-supplied ` instance_id ` only when an agent needs idempotency. Pair it
84+ with ` duplicate_start_policy=return_existing_active ` when a repeated smoke run
85+ should attach to the active workflow instead of failing as a duplicate.
86+
87+ ## Tool Result Contract
88+
89+ Agents should treat the following result fields as the durable handles for
90+ cross-tool correlation:
91+
92+ | Tool | Stable result fields |
93+ | --- | --- |
94+ | ` list_workflows ` | ` available_workflows ` , ` allow_fqcn ` , ` workflow_id_kind ` , ` run_id_kind ` , ` status_values ` , and optional ` recent_workflows ` . |
95+ | ` start_workflow ` | ` workflow_id ` , ` run_id ` , ` workflow ` , ` workflow_class ` , ` workflow_type ` , ` status ` , ` running ` , ` business_key ` , ` duplicate_start_policy ` , and ` command ` . |
96+ | ` get_workflow_result ` | ` found ` , ` workflow_id ` , ` run_id ` , ` current_run_id ` , ` current_run_is_selected ` , ` status ` , ` running ` , ` output ` , ` error ` , visibility metadata, and timestamps. |
97+ | ` get_workflow_history ` | ` found ` , ` workflow_id ` , ` run_id ` , ` current_run_id ` , ` status ` , ` history_event_count ` , ` returned_event_count ` , ` events_are_most_recent ` , ` payloads_included ` , ` events ` , and ` failures ` . |
98+
99+ History payload previews are intentionally bounded. When ` include_payloads ` is
100+ true, each event preview reports ` payload_preview_limit_bytes ` , ` size_bytes ` ,
101+ ` preview_bytes ` , and ` truncated ` so an agent can cite whether it saw the full
102+ payload or only a preview.
103+
66104## Safe Agent Loop
67105
68106Use no-credential workflows first:
0 commit comments