Skip to content

API Reference parrot_formdesigner.tools.request_form

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_formdesigner.tools.request_form

View source

RequestFormTool — platform-agnostic form request tool.

Allows the LLM to request a structured form from the user when it needs to collect parameters for another tool. Migrated from parrot/integrations/msteams/tools/request_form.py — no longer Teams-specific.

Flow:

  1. LLM calls request_form(target_tool="search", known_values={"limit": 10})
  2. RequestFormTool looks up the target tool in ToolManager
  3. Uses ToolExtractor to generate FormSchema, excluding known fields
  4. Returns ToolResult(status="form_requested", metadata={"form": schema_dict, ...})
  5. The platform wrapper (Teams, Telegram, web) detects status and renders the form

Alias FormRegistry

Re-exported from parrot_formdesigner.services.registry.FormRegistry.

Alias FormSchema

Re-exported from parrot_formdesigner.core.schema.FormSchema.

Class RequestFormInput

Input schema for the request_form tool.

Fields:

Field Type Default Description
target_tool str Name of the tool to execute after form completion.
known_values dict[str, Any] Parameter values already extracted from conversation.
fields_to_collect list[str] | None None Specific field names to include in the form.
form_title str | None None Custom form title.
context_message str | None None Message explaining to the user why the form is needed.

Class RequestFormTool

Platform-agnostic tool that requests a form to collect missing parameters.

The LLM should use this tool when it determines that:

  • A tool needs to be executed but is missing required parameters
  • The missing information is best collected via a structured form
  • Multiple parameters need to be gathered at once

The tool generates a FormSchema using ToolExtractor and returns it in the ToolResult metadata. Platform wrappers (Teams, Telegram, web) detect the status="form_requested" signal and render the appropriate form UI.

Parameter Type Default Description
tool_manager ToolManager Manager for looking up and listing tools.
form_registry FormRegistry | None None Optional registry for looking up pre-defined forms.
tool_extractor ToolExtractor | None None Optional ToolExtractor instance (created if None).
**kwargs Any {}

Attributes:

Attribute Type Description
name str
description str

Alias ToolExtractor

Re-exported from parrot_formdesigner.extractors.tool.ToolExtractor.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally