pdfops-mcp 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +4 -2
- package/dist/source.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Any other stdio client (Windsurf, Cline, Zed, your own agent): command `npx`, ar
|
|
|
61
61
|
|
|
62
62
|
A hosted MCP runtime executes this server on a machine where your agent's file paths do not exist. Nothing changes in the config — pass sources the server can reach and skip `output_path`:
|
|
63
63
|
|
|
64
|
-
- **Inputs** (`pdf_path`, `pdf_paths`): an `https://` URL the server can fetch (≤
|
|
64
|
+
- **Inputs** (`pdf_path`, `pdf_paths`): an `https://` URL the server can fetch (≤4 MB per PDF, ≤4.5 MB per request — the API's limits), or a `data:application/pdf;base64,…` URI for small files.
|
|
65
65
|
- **Outputs**: omit `output_path` and `pdf_fill` / `pdf_merge` / `pdf_invoice` return the PDF inline as an embedded `application/pdf` resource (`pdfops://filled.pdf`, …) that the client saves. With `output_path` set, the file is written where the *server* runs.
|
|
66
66
|
|
|
67
67
|
Locally, absolute paths keep working exactly as before and remain the recommended form — bytes stay off the model context.
|
package/dist/index.js
CHANGED
|
@@ -82,10 +82,11 @@ server.registerTool('pdf_inspect', {
|
|
|
82
82
|
outputSchema: {
|
|
83
83
|
count: z.number().int().describe('Number of form fields found; 0 when the PDF has no fillable form'),
|
|
84
84
|
hasXFA: z.boolean().describe('True for hybrid AcroForm/XFA documents, whose XFA layer is dropped when filled'),
|
|
85
|
+
truncated: z.boolean().describe('True when the form exceeded an API enumeration cap; fields is then a prefix, not the full list'),
|
|
85
86
|
fields: z
|
|
86
87
|
.array(z.object({
|
|
87
88
|
name: z.string(),
|
|
88
|
-
type: z.string().describe('text, checkbox, radio, optionlist, or unsupported'),
|
|
89
|
+
type: z.string().describe('text, checkbox, dropdown, radio, optionlist, or unsupported'),
|
|
89
90
|
readOnly: z.boolean(),
|
|
90
91
|
value: z.string().optional(),
|
|
91
92
|
options: z.array(z.string()).optional().describe('Permitted values for radio/dropdown/optionlist fields'),
|
|
@@ -175,8 +176,9 @@ server.registerTool('pdf_invoice', {
|
|
|
175
176
|
invoice_number: z.string().optional(),
|
|
176
177
|
date: z
|
|
177
178
|
.string()
|
|
179
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
178
180
|
.optional()
|
|
179
|
-
.describe('Shown on the invoice; also pins metadata for determinism'),
|
|
181
|
+
.describe('Calendar date in YYYY-MM-DD form (other formats are rejected with invalid_date). Shown on the invoice; also pins metadata for determinism'),
|
|
180
182
|
due: z.string().optional(),
|
|
181
183
|
currency: z.string().regex(/^[A-Z]{3}$/).optional(),
|
|
182
184
|
tax_rate: z.number().min(0).max(100).optional(),
|
package/dist/source.js
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
// Outputs mirror it: with `output_path` the PDF is written to disk; without it
|
|
15
15
|
// the PDF comes back as an embedded application/pdf resource the client saves.
|
|
16
16
|
import { readFile } from 'node:fs/promises';
|
|
17
|
-
/** Upper bound on a fetched
|
|
18
|
-
export const MAX_INPUT_BYTES =
|
|
17
|
+
/** Upper bound on a fetched PDF: the API's per-PDF cap, so oversize fails here with a clear message. */
|
|
18
|
+
export const MAX_INPUT_BYTES = 4 * 1024 * 1024;
|
|
19
19
|
export const classifySource = (s) => {
|
|
20
20
|
if (/^data:/i.test(s))
|
|
21
21
|
return 'data';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdfops-mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"mcpName": "dev.pdfops/pdfops-mcp",
|
|
5
5
|
"description": "MCP server for the PDFops API — give AI agents deterministic PDF tools: inspect AcroForm fields, fill forms, merge PDFs, and generate invoices. Works with Claude Code, Claude Desktop, Cursor, and any MCP client.",
|
|
6
6
|
"keywords": [
|