extract_markdown_from_url
Extract markdown text from a publicly accessible PDF or image URL, and optionally save the output and images to disk.
Instructions
Extract markdown text from a publicly accessible URL.
Processes a PDF or image directly from a URL without uploading
a local file first. When output_dir is provided, saves the
extracted markdown to content.md inside a named subdirectory.
When include_images is also True, saves embedded images
alongside the markdown file.
Args:
file_url: Publicly accessible URL to a PDF or image
output_dir: Absolute path to an existing output directory (must be
within allowed dir). When set, saves markdown to disk at
<output_dir>/<url_stem>/content.md.
include_images: When True (requires output_dir), save images to
disk and rewrite markdown with relative image links.
Returns: When output_dir is not set: result: Extracted markdown content When output_dir is set (with or without images): output_directory: Absolute path to the output subdirectory markdown_file: Absolute path to the content.md file images: List of saved image filenames (empty if include_images is False)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | ||
| output_dir | No | ||
| include_images | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| images | Yes | ||
| result | Yes | ||
| markdown_file | Yes | ||
| output_directory | Yes |