Skip to content

FormInput: agent cannot pre-populate form fields #3930

@eanderson608

Description

@eanderson608

Enhancement

The built-in FormInput app provider has no way for the agent to pass initial values into the form. When building bug reports, Jiras, or similar structured data collaboratively with an LLM, the agent typically has most of the information by the time it opens the form, but the generated tool only accepts prompt, title, and submit_text. The user always sees a blank form. Since these forms are designed to be invoked by LLMs, it's a natural expectation that the agent can pre-fill fields with what it already knows.

Expected Behavior: The form tool accepts a prefill dict (e.g., {"title": "...", "severity": "high"}) and the form renders with those values filled in. The user can still edit anything before submitting

Design Proposal: This likely needs a small upstream change in Prefab. Form.from_model() doesn't currently accept runtime default values. Once Prefab supports that, the FastMCP side is a trivial passthrough (one new parameter on collect_input, one keyword argument forwarded to Form.from_model()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement to existing functionality. For issues and smaller PR improvements.serverRelated to FastMCP server implementation or server-side functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions