pdf_do
Automate multi-step PDF workflows from a natural-language task, chaining extraction, conversion, annotation, validation, and search tools to deliver a final answer.
Instructions
Chain the PDF tools autonomously to complete a natural-language task.
Requires a local LLM (Ollama or LM Studio) or a client that supports MCP sampling. The LLM plans up to 6 tool calls from the pdf_* surface, the server answer. pdf_do cannot call itself or pdf_shutdown.
Return Format
A dict with keys:
success: bool
answer: str - final natural-language answer
steps: list of {tool, args, result} execution records On failure: {success: False, error}.
Examples
await pdf_do(task="Summarize this report and check it for PII.", path="report.pdf") {"success": true, "answer": "The report covers Q3 results... 3 PII hits found.", "steps": [{"tool": "pdf_export", ...}]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to a PDF file if the task targets one. | |
| task | Yes | Natural-language task to perform with the PDF tooling. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | Human-readable summary | |
| success | No | Whether the operation succeeded |