Skip to content

PIGS-866 - Add FDF and XFDF support to fill_forms#89

Merged
RogerThomas merged 1 commit into
mainfrom
PIGS-866-Add-FDF-and-XFDF-support
Jun 23, 2026
Merged

PIGS-866 - Add FDF and XFDF support to fill_forms#89
RogerThomas merged 1 commit into
mainfrom
PIGS-866-Add-FDF-and-XFDF-support

Conversation

@RogerThomas

Copy link
Copy Markdown
Contributor

What

The platform fill-forms endpoint 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's fill_forms tool.

Changes

  • client/enums.ts — add XFDF and FDF content types.
  • handlers/platformHandler.tsfillForms accepts 'xfdf' | 'fdf' and sends the correct content type + filename.
  • tools/generations.tsfill_forms tool gains xfdfPath and fdfPath inputs; description and one-of validation updated.
  • tests — new handler + tool cases for XFDF and FDF.

Testing

vitest run generations platformHandler → 39 passed (incl. new XFDF/FDF cases).

Note: task n:check reports a pre-existing Cannot find module 'jimp' error in rendering.ts (dependency in package.json but missing from this environment's node_modules) — unrelated to this change.

🤖 Generated with Claude Code

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.FDF MIME types and updated PlatformHandler.fillForms to send the correct content type + filename for each format.
  • Updated the fill_forms tool schema and runtime validation to accept xfdfPath / fdfPath and pass through raw bytes with a dataFormat of '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.

Comment thread node-version/src/tools/generations.ts
@RogerThomas RogerThomas merged commit 32b69d4 into main Jun 23, 2026
8 checks passed
@RogerThomas RogerThomas deleted the PIGS-866-Add-FDF-and-XFDF-support branch June 23, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants