Skip to main content
Glama
ONDC-Official

ondc-mcp

Official

Advance the flow

flow_proceed

Generate and send the next step's payload in an ONDC flow, checking preconditions and recording results. Supports required inputs, dry runs, and payload overrides to avoid abandoned runs.

Instructions

The loop driver. Takes the next step this mock owns, checks its preconditions, generates its payload from the flow's own mock config, and POSTs it to the participant — then records both the payload and whatever the step saved for later steps. If the step needs values it comes back INPUT_REQUIRED with the declarations; call again with inputs. If the next move is the participant's it comes back WAITING; call flow_await. Pass dry_run: true to generate and inspect a payload without sending it, or trigger_extra to fire a named side-channel step. When a step is blocked because the flow's own config generates a non-compliant payload, payload_overrides patches the offending fields so the run can continue instead of being abandoned. Sending the flow's first action is what mints its transaction_id, which the answer then reports.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputsNoValues for a step reported as INPUT_REQUIRED, as a **flat** object: it becomes `sessionData.user_inputs` verbatim and the step's generator reads the declared field names off the top of it. Do not nest them under the declaration's name — `inputs_required.fields` lists the keys to send, and `inputs_required.example` shows the shape. For a manual step pass {id: '<step_key>'} — naming it is what triggers it.
dry_runNoGenerate and record the payload but do not send it, so it can be inspected first. Nothing reaches the participant. Combines with `payload_overrides` to check a patch before it goes out.
flow_idNoThe flow started with flow_start. Works before the transaction id exists, so prefer it.
session_idYesSession returned by session_create.
trigger_extraNoFire a named side-channel step from the flow's extra sequence instead of advancing the main sequence. Only steps this mock owns can be fired.
transaction_idNoA specific transaction. Only known once the flow's first action has crossed the wire.
payload_overridesNoPatch the generated payload before it is validated and sent: a map of JSONPath to replacement value, e.g. {"$.context.bpp_uri": "https://np.example.com/seller"}. This is the escape hatch for a **flow config that is itself wrong** — a step whose generator emits a non-compliant field cannot otherwise be got past, and abandoning the run costs the participant its compliance report. Not a validation bypass: the gate still runs on the patched payload, so an override that does not fix the finding still blocks. Paths must be concrete (no wildcards, filters or `..`), `$.context.transaction_id` is refused, and they apply to this call only — a chained step never inherits them.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
ackNoHow the participant answered a SENT step.
actionNoIts protocol action or form type.
eventsNoWhat has happened in this session since your last call — the participant's callbacks, steps sent automatically, refusals, form submissions. Attached to every session-scoped result and delivered exactly once, so read it here instead of polling. Absent when nothing happened. `more` above zero means call record_get_events for the rest.
reasonNoMachine-readable cause of a block.
detailsNoEverything known about the block — requirement codes, errors.
messageYes
outcomeYes
ack_bodyNoThe participant's synchronous response, verbatim.
form_urlNoWhere the form lives, for whichever side has to open it.
step_keyNoThe step this outcome is about.
form_roleNo'fill' — the participant hosts the form and this mock must submit it. 'host' — this mock serves the form and the participant must submit it.
overridesNoPaths patched by `payload_overrides` before this payload was validated and sent. Present only when a step was patched, which makes it not a clean step: the participant was tested against a payload this flow's own config did not produce, and the compliance report says so.
payload_idNoHandle for the payload produced. Read it with record_get_payload.
validationNoHow the generated payload judged against the spec. Present whenever a payload was produced, including one that was blocked or drafted rather than sent. `status: "unavailable"` means it went unchecked — the payload was still sent, because refusing to act on our own outage would strand the run.
http_statusNo
input_problemsNoWhy the supplied `inputs` were refused. Present only when values were sent and did not match — nothing was generated or sent, so fixing them and calling again costs the run nothing.
transaction_idNoThis flow run's transaction id. Absent until the flow's first action crosses the wire — it belongs to whoever sends that action, so when the participant moves first it is theirs to choose and unknowable until their call lands. Address the run by flow_id until then.
expected_actionNoThe action now expected from the participant.
inputs_requiredNoWhat the step declares it needs. Send `fields` as a flat object under flow_proceed's `inputs`.
override_problemsNoWhy `payload_overrides` were refused. Nothing was patched, generated or sent — every path is judged before any is written, so correcting them and calling again costs the run nothing.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses key side effects beyond annotations: it POSTs to the participant, records payloads and saved step data, does not send with dry_run, patches payloads via payload_overrides without bypassing validation, and mints transaction_id on first action. This is substantial behavioral context that annotations alone do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense yet each clause adds essential operational detail: return states, dry-run behavior, side-channel steps, payload overrides, and transaction_id creation. It is front-loaded with 'The loop driver' and remains efficient despite covering a high-complexity tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description covers behavioral states (INPUT_REQUIRED, WAITING), dry_run, trigger_extra, payload_overrides, and transaction_id lifecycle. It is complete for a tool of this complexity, addressing edge cases like blocked non-compliant payloads and providing the needed resolution path.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing baseline 3. The description adds meaningful context for `inputs` (flat shape, becoming sessionData.user_inputs) and `payload_overrides` (escape hatch for wrong flow config, not validation bypass, applies to this call only), raising the value beyond the schema. It does not elaborate on every parameter, but the schema already does.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'The loop driver' and explicitly states it 'takes the next step this mock owns, checks its preconditions, generates its payload... and POSTs it to the participant.' It clearly distinguishes itself from siblings by referencing flow_await for participant-owned moves and flow_start/restart via transaction_id minting context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides actionable guidance: 'call again with `inputs`' for INPUT_REQUIRED steps, 'call flow_await' when WAITING, use 'dry_run: true' to inspect without sending, and use 'trigger_extra' for side-channel steps. It also explains when 'payload_overrides' is needed, giving explicit alternatives and conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ONDC-Official/automation-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server