PIGS-866 - Add FDF and XFDF support to fill_forms#89
Merged
Conversation
The platform fill-forms endpoint now accepts XFDF and FDF data files in addition to CSV and JSON. Wire the two new formats through the MCP server. - enums.ts: add XFDF (application/vnd.adobe.xfdf) and FDF (application/vnd.fdf) content types - platformHandler.fillForms: accept 'xfdf' | 'fdf' and send the correct content type / filename - fill_forms tool: add xfdfPath and fdfPath inputs, update the description and the one-of validation - tests: cover the new formats in the handler and tool suites Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Extends the MCP server’s fill_forms tool and Platform handler wiring so the platform fill-forms endpoint can accept XFDF and FDF field data files in addition to existing CSV and JSON inputs.
Changes:
- Added
ContentType.XFDF/ContentType.FDFMIME types and updatedPlatformHandler.fillFormsto send the correct content type + filename for each format. - Updated the
fill_formstool schema and runtime validation to acceptxfdfPath/fdfPathand pass through raw bytes with adataFormatof'xfdf' | 'fdf'. - Added Vitest coverage for the new formats in both the handler and tool tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| node-version/src/client/enums.ts | Adds XFDF/FDF content types for downstream request construction. |
| node-version/src/handlers/platformHandler.ts | Wires new dataFormat values to correct content type + filename for the generations fill-forms call. |
| node-version/src/tools/generations.ts | Extends fill_forms inputs and one-of validation to allow XFDF/FDF paths and pass bytes through. |
| node-version/tests/platformHandler.test.ts | Adds handler tests asserting XFDF/FDF are sent as separate files with correct metadata. |
| node-version/tests/generations.test.ts | Adds tool tests ensuring XFDF/FDF file bytes are read and forwarded with the correct format. |
timshari-nitro
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The platform
fill-formsendpoint now accepts XFDF (application/vnd.adobe.xfdf) and FDF (application/vnd.fdf) data files in addition to CSV and JSON. This wires the two new formats through the MCP server'sfill_formstool.Changes
client/enums.ts— addXFDFandFDFcontent types.handlers/platformHandler.ts—fillFormsaccepts'xfdf' | 'fdf'and sends the correct content type + filename.tools/generations.ts—fill_formstool gainsxfdfPathandfdfPathinputs; description and one-of validation updated.Testing
vitest run generations platformHandler→ 39 passed (incl. new XFDF/FDF cases).Note:
task n:checkreports a pre-existingCannot find module 'jimp'error inrendering.ts(dependency inpackage.jsonbut missing from this environment'snode_modules) — unrelated to this change.🤖 Generated with Claude Code