Skip to content

API Reference parrot_tools.msword

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

parrot_tools.msword

View source

MS Word Tool migrated to use AbstractDocumentTool framework.

Alias AbstractDocumentTool

Re-exported from parrot_tools.document.AbstractDocumentTool.

Alias DocumentGenerationArgs

Re-exported from parrot_tools.document.DocumentGenerationArgs.

Class MSWordArgs

Arguments schema for MS Word Document generation.

Attributes:

Attribute Type Description
template_name Optional[str]
template_vars Optional[Dict[str, Any]]
docx_template Optional[str]
style_config Optional[Dict[str, Any]]
page_margins Optional[Dict[str, float]]

Method MSWordArgs.validate_template_name

validate_template_name(v)

Parameter Type Default Description
v

Method MSWordArgs.validate_docx_template

validate_docx_template(v)

Parameter Type Default Description
v

Class MSWordTool

Microsoft Word Document Generation Tool.

This tool converts text content (including Markdown and HTML) into professionally formatted Word documents (.docx). It supports custom templates, styling, and advanced document formatting features.

Features:

  • Markdown to Word conversion with proper formatting
  • HTML to Word conversion support
  • Custom DOCX template support
  • Jinja2 HTML template processing
  • Configurable styling and page setup
  • Table, list, and heading support
  • Professional document formatting
Parameter Type Default Description
templates_dir Optional[Path] None Directory containing HTML and DOCX templates
default_html_template Optional[str] None Default HTML template for content processing
artifact_store Any None Server-managed artifact store (exports are published there when set)
**kwargs {} Additional arguments for AbstractDocumentTool

Class WordToMarkdownTool

Tool for converting Word documents to Markdown format.

This tool downloads Word documents from URLs and converts them to Markdown format for easier processing by LLMs and other text analysis tools.

Parameter Type Default Description
artifact_store Any None
**kwargs {}

Method WordToMarkdownTool.convert_from_url

Convert Word document from URL to Markdown.

convert_from_url(url: str, save_markdown: bool = False, **kwargs) -> Dict[str, Any]

Parameter Type Default Description
url str URL of the Word document
save_markdown bool False Whether to save the markdown to a file
**kwargs {} Additional arguments for file saving

Returns: Dict[str, Any] — Dictionary with conversion results

Alias safe_template_name

Re-exported from parrot_tools._exports.safe_template_name.

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