[PIGS-839] Add extract_fillable_form_data MCP tool#98
Merged
Conversation
Extracts existing AcroForm field data (names, values, types, positions) from a PDF via the new extract-fillable-form-data extractions method. JSON only, flat formFields list; pairs round-trip into fill_forms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new extraction capability to the Node MCP server for reading existing AcroForm field data from fillable PDFs, enabling MCP-driven “inspect then fill” workflows that round-trip into fill_forms.
Changes:
- Introduces
extract_fillable_form_dataMCP tool withoutputTargetsupport viajsonResult(inline/file/both). - Adds
PlatformHandler.extractFillableFormData()to call the platform extraction methodextract-fillable-form-datawith JSON accept format. - Extends Vitest coverage across handler + tool layers and updates shared handler mocks used by other tool tests.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| node-version/src/tools/extractions.ts | Registers the new extract_fillable_form_data tool and routes its JSON output through jsonResult. |
| node-version/src/handlers/platformHandler.ts | Adds extractFillableFormData() extraction call and reuses _extractResult to normalize JSON responses. |
| node-version/tests/extractions.test.ts | Adds tool-level tests for default inline output, file output, and error propagation. |
| node-version/tests/platformHandler.test.ts | Adds handler-level test asserting the correct platform method/params and returned extracted JSON buffer. |
| node-version/tests/helpers/fixtures.ts | Extends MockPlatformHandler and factory to include extractFillableFormData. |
| node-version/tests/conversions.test.ts | Updates platform handler mock shape to include the new method. |
| node-version/tests/generations.test.ts | Updates platform handler mock shape to include the new method. |
| node-version/tests/pii.test.ts | Updates platform handler mock shape to include the new method. |
| node-version/tests/rendering.test.ts | Updates platform handler mock shape to include the new method. |
| node-version/tests/transformations.test.ts | Updates platform handler mock shape to include the new method. |
isadoraPGoNitro
approved these changes
Jul 3, 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.
Ticket
PIGS-839 — PDF acro form extract data
What
Adds the
extract_fillable_form_dataMCP tool: extracts the existing AcroForm field data (names, values, types, positions) from a PDF via the newextract-fillable-form-dataextractions method. JSON only per the ticket's MCP acceptance criteria (flatformFieldslist,outputTargetinline/file/both via the standardjsonResulthelper); the name/value pairs round-trip directly intofill_forms— the ticket's primary motivation is MCP-driven form filling.extractFillableFormDatahandler insrc/handlers/platformHandler.ts(method: 'extract-fillable-form-data',params: {}so the API's JSON default applies)src/tools/extractions.ts(READ_ONLY,stemSuffix: 'form-data')Checks
task n:check(prettier, tsc, eslint) clean;task n:test— 186 tests passed.Sibling PRs
🤖 Generated with Claude Code