Close a PDF workspace
close_workspaceDelete one temporary workspace and its stored PDF and preview files when work is finished.
Deletes the temporary workspace record (`workspace_id`), its uploaded source
PDF, any rendered preview images (`preview_url`), and any generated output
PDF (`download_url`) before the automatic 24-hour TTL expiration. This does
not delete saved templates created with `save_template` or files the user has
already downloaded. The operation is idempotent (`already_closed=True` when
already gone), so cleanup code may safely call it in ``finally``.
When to use:
- Call `close_workspace` only after the user has received or downloaded the
filled PDF from `fill_pdf` (and after calling `save_template`, if saving the
layout), because closing immediately invalidates `download_url` and
`preview_url` links.
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": {
"workspace_id": "<workspace_id>"
},
"name": "close_workspace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace_id | Yes | Active workspace ID returned by `open_pdf` (`summary.workspace_id`) to close and purge. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||