Skip to contents

Converts a local file to markdown text using Python MarkItDown via reticulate. This is useful for rich formats (e.g. DOCX, PPTX, PDF, HTML) when you want a markdown representation instead of raw file text.

Usage

tool_read_markdown(path)

Format

A tool definition created with ellmer::tool().

Arguments

path

Path to the file to convert (tool argument, not R function argument)

Details

Requires:

  • R package reticulate

  • Python module markitdown (e.g., pip install 'markitdown[all]')

Examples

if (FALSE) { # \dontrun{
tool_read_markdown("report.pdf")
} # }