extract_attachments
Save embedded files from a PDF into a folder, all or selected by name, while skipping executable attachments unless explicitly allowed.
Instructions
Save files embedded in a PDF into a folder (default: "_attachments" next to it): all of them, or those named (see list_attachments). Names are made safe to use as file names; prefer a new folder, since saved files can have any name. Attachments that can run on a computer (programs, scripts, ...) are skipped unless allow_executables=true; only set that if the user asked for them. Files that are damaged, over the file size limit or in an unsupported encoding are listed in skipped, as are files past a total of 4x that limit per call; only the first 1,000 attachments are read (truncated). Saved files are not password-protected, even if the PDF is. Needs the owner password if the PDF forbids copying.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input_path": "<input_path>"
},
"name": "extract_attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | ||
| password | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_dir | No | ||
| allow_executables | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| skipped | Yes | ||
| truncated | Yes | ||
| output_dir | Yes |