Skip to content

API Reference parrot_formdesigner.extractors.tool

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

parrot_formdesigner.extractors.tool

View source

Tool extractor for FormSchema generation from AbstractTool instances.

Extracts FormSchema from a tool's args_schema by delegating to PydanticExtractor with tool-specific metadata (name, description) and field filtering.

Alias FormField

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

Alias FormSchema

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

Alias FormSection

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

Alias PydanticExtractor

Re-exported from parrot_formdesigner.extractors.pydantic.PydanticExtractor.

Class ToolExtractor

Extracts FormSchema from AbstractTool.args_schema.

Delegates Pydantic model introspection to PydanticExtractor, then applies tool-specific metadata and field filtering:

  • Excludes context fields (AbstractToolArgsSchema._context_fields)
  • Excludes pre-filled known_values fields
  • Sets form_id to "{tool.name}_form"
  • Uses tool.description as form description
Parameter Type Default Description
pydantic_extractor PydanticExtractor | None None Optional PydanticExtractor instance to use. Defaults to a new PydanticExtractor.

Method ToolExtractor.extract

Extract FormSchema from a tool's args_schema.

extract(tool: Any, *, exclude_fields: set[str] | None = None, known_values: dict[str, Any] | None = None) -> FormSchema

Parameter Type Default Description
tool Any AbstractTool instance (or duck-typed object with name, description, args_schema attributes).
exclude_fields set[str] | None None Additional field IDs to exclude from the form.
known_values dict[str, Any] | None None Pre-filled field values. Fields in this dict are excluded from the generated form.

Returns: FormSchema — FormSchema representing the tool's input parameters.

Raises:

  • ValueError — If the tool has no args_schema.

Alias resolve_rule_references

Re-exported from parrot_formdesigner.core.resolution.resolve_rule_references.

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