Skip to main content
Glama
ONDC-Official

ondc-mcp

Official

Read a pending form

form_fetch
Read-onlyIdempotent

Fetch the active form in a flow, returning fillable fields for form_submit or a link when manual entry is required.

Instructions

Read the form a flow is waiting on. When the participant hosts it, this fetches the page, screens it for active content, and returns its fields ready to fill — then call form_submit. When this mock hosts it, there is nothing to do but wait for the participant, and the answer says so. In a manual-mode session it returns the link to hand to a person instead of the fields. Omit step_key to use whichever form the flow is currently waiting on.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
step_keyNoWhich form step. Omit to use whichever form the flow is waiting on.
session_idYesSession returned by session_create.
transaction_idYesTransaction the form belongs to.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes'llm_auto' — fill `fields` and call form_submit. 'manual' — give form_url to the human, then call form_submit with the submission_id they receive.
roleYes'fill' — the participant hosts this form and this mock must submit it. 'host' — this mock serves it and the participant must submit it.
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.
fieldsYesInputs parsed out of the form. Empty in manual mode.
methodNoGET or POST, as the form declares.
form_urlNoWhere the form lives.
step_keyYes
warningsYesAnything suspicious in the page — read these before filling it.
action_urlNoWhere a submission is POSTed. Resolved against the form's URL.
instructionsYesWhat to do next, given the mode and the role.
Behavior5/5

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

Even though annotations already mark readOnlyHint, openWorldHint, and idempotentHint, the description adds valuable behavioral context: it 'screens for active content', returns fields 'ready to fill', explains the mock-host behavior ('the answer says so'), and clarifies manual-mode returns a link instead. This goes well beyond the annotations without contradicting them.

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 three concise sentences, front-loaded with the core action ('Read the form a flow is waiting on') and then expanding into conditional scenarios. Every sentence earns its place, with no redundant filler or repetition of schema/annotation content.

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?

The description covers all major usage modes (participant-hosted, mock-hosted, manual-mode), the next step (form_submit), and the optional step_key behavior. With an output schema present and annotations providing safety and idempotency info, the description fully addresses the tool's complexity.

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% with descriptions for all parameters. The description adds extra meaning to step_key by explaining the omission behavior ('use whichever form the flow is currently waiting on'), which is not in the schema's property description. Session_id and transaction_id are already well-defined in the schema, so no further elaboration is needed.

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 clearly states 'Read the form a flow is waiting on' – a specific verb and resource. It distinguishes the tool from siblings by explaining its role as a precursor to form_submit and differentiates from flow_get_status/flow_await by focusing on fetching and returning fields.

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 explicit usage guidance across three contexts: participant-hosted (fetches fields, then call form_submit), mock-hosted (nothing to do but wait), and manual-mode (returns a link to hand to a person). It also instructs on omitting step_key to use the current form, giving clear when-to-use and what-to-do guidance.

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