validate_postscript
Validates PostScript and EPS programs by interpreting them with Ghostscript's bbox device, reporting syntax errors, undefined names, stack issues, and computing bounding boxes.
Instructions
Interpret a PostScript/EPS program WITHOUT rasterising and report errors.
This is the fast self-check to run before presenting any PostScript. It uses Ghostscript's bbox device, so it catches real interpreter errors (undefined names, stack underflow, type errors, unbalanced save/restore) and returns the computed bounding box — useful for setting an EPS %%BoundingBox.
Provide EITHER source (the program text) or path (a file on disk).
Returns: {ok, diagnostics[{error, offending_command, message, is_postscript_error}], bbox, hires_bbox, hint, ghostscript_stderr}.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "validate_postscript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| source | No |