Given a url for a webpage, convert it to pdf suitable for mobile reading.
See examples.
uvplaywright itself will be installed by uv automatically, while it also needs browser to be installed:
uvx playwright install chromium
uv run --script ${baseDir}/url2pdf.py "${url}"
Path to pdf will be printed to stdout.
Use the message tool to send the pdf file to the user as a document message:
{
"action": "send",
"filePath": "<filepath>"
}
共 1 个版本