Skip to main content
Glama
jhauga
by jhauga

Mirror a website form

mirror_web_form

Fetch a public web page, extract one form, and render it as an interactive card; submitted values return as structured data for a model-created task to submit the actual site form.

Instructions

Fetch a public web page, extract one of its forms, and render it as an interactive card in the conversation. When the user submits the card, the values return to the chat as a structured payload for the submit_web_form tool, so a model-created task can submit the actual website form.

Input Schema

NameRequiredDescriptionDefault
urlYes
titleNoCard title override
formIndexNoWhich form on the page, default 0

Output Schema

NameRequiredDescriptionDefault
cardYes
partsYesSplit state, present on EVERY card result so one completeness check works for all card types. Cards that cannot split always report {current:1,total:1,hasMore:false}; create_markdown_card and create_code_tour_card pack oversized content into parts and can report more. Read hasMore rather than the card title to decide whether content was withheld.
displayNoPresent only when the host is not mounting this server's MCP Apps template (see MCP_CHAT_CARDS_RENDER): the card ships as a ready-made visualizer widget instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0-alpha.1.0.1
    • addedOutput schema / properties / display
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present only when the host is not mounting this server's MCP Apps template (see MCP_CHAT_CARDS_RENDER): the card ships as a ready-made visualizer widget instead.",
      +  "properties": {
      +    "action": {
      +      "description": "What the caller must do to put the card in front of the user",
      +      "type": "string"
      +    },
      +    "loading_messages": {
      +      "description": "show_widget loading_messages",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "shown": {
      +      "description": "False: the user cannot see this card until action is taken",
      +      "type": "boolean"
      +    },
      +    "title": {
      +      "description": "show_widget title (snake_case)",
      +      "type": "string"
      +    },
      +    "widget_code": {
      +      "description": "show_widget widget_code, passed unchanged",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "shown",
      +    "action",
      +    "title",
      +    "loading_messages",
      +    "widget_code"
      +  ],
      +  "type": "object"
      +}
  2. Changed4 schema fields changedv0.1.3-alpha
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedOutput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedOutput schema / properties / parts
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Split state, present on EVERY card result so one completeness check works for all card types. Cards that cannot split always report {current:1,total:1,hasMore:false}; create_markdown_card and create_code_tour_card pack oversized content into parts and can report more. Read hasMore rather than the card title to decide whether content was withheld.",
      +  "properties": {
      +    "current": {
      +      "description": "Part number this result rendered (1-based)",
      +      "type": "number"
      +    },
      +    "hasMore": {
      +      "description": "True when content was withheld; call again with part: current + 1",
      +      "type": "boolean"
      +    },
      +    "total": {
      +      "description": "How many parts the content splits into",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "current",
      +    "total",
      +    "hasMore"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "card"
      -]New value: +[
      +  "card",
      +  "parts"
      +]
  3. First observedv0.0.0-alpha

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose a genuinely non-obvious trait: the card is interactive, and on submit the values return to the chat as a structured payload routed to submit_web_form. The word "public" implicitly flags that no authentication is available. It does not cover failure modes (JS-rendered forms, unreachable pages) or any rate limiting.

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?

Two sentences, no filler, with the core action stated first and the downstream handoff second. Every clause adds information the agent needs.

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

Completeness4/5

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

An output schema exists, so return-value explanation is rightly omitted, and the description supplies the workflow context an unannotated tool needs. Minor gaps remain around error behavior and whether non-public or login-gated pages are rejected, but nothing essential to a correct call is missing.

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

Parameters3/5

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

Schema coverage is 67% with url fully specified as a URI, and title/formIndex already documented in the schema. The description adds only marginal semantics — "public web page" constrains url, and "one of its forms" loosely maps to formIndex, but it never mentions the title override. Roughly baseline for partially-covered params.

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 gives a precise verb chain — fetch a public page, extract one of its forms, render it as an interactive card — which is clearly distinct from sibling tools like create_form_card (builds a card from scratch) and fetch_reference (plain fetch). It even names submit_web_form as the downstream consumer, so the agent can place this tool in the workflow without opening another schema.

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

Usage Guidelines4/5

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

The use case is explicit: mirror a real website's form so a model-created task can submit it. The description explains the full round trip, ending with submit_web_form. It falls short of naming when *not* to use it (e.g., versus fetch_reference or create_form_card for non-web forms), which keeps it out of the top band.

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