feat(unstructured): add Transform MCP tool#3438
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the hosted Unstructured Transform MCP workflow while retaining the legacy Partition tool.
Changes:
- Adds document transformation with multiple output formats and RAG preprocessing.
- Expands provider credentials, documentation, and privacy disclosures.
- Adds MCP dependencies and focused helper tests.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.difyignore |
Excludes tests from packages. |
PRIVACY.md |
Documents data handling. |
README.md |
Documents Transform and Partition tools. |
main.py |
Extends request timeout. |
manifest.yaml |
Releases version 0.0.10. |
provider/unstructured.py |
Routes credential validation. |
provider/unstructured.yaml |
Registers Transform credentials and tool. |
pyproject.toml |
Adds MCP and test dependencies. |
tests/test_transform.py |
Tests payload and stage helpers. |
tools/transform.py |
Implements the Transform workflow. |
tools/transform.yaml |
Defines the Transform interface. |
uv.lock |
Locks added dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please resolve the comments if you think it's irrelvant. |
|
Thanks! I addressed all six review comments in |
| meta={"filename": filename, "mime_type": mime_type}, | ||
| ) | ||
| yield self.create_variable_message("job_id", result["job_id"]) | ||
| yield self.create_variable_message("output_ref", result.get("output_ref", "")) |
| from dify_plugin import Plugin, DifyPluginEnv | ||
|
|
||
| plugin = Plugin(DifyPluginEnv(MAX_REQUEST_TIMEOUT=120)) | ||
| plugin = Plugin(DifyPluginEnv(MAX_REQUEST_TIMEOUT=600)) |
| required: false | ||
| type: secret-input | ||
| url: https://platform.unstructured.io/app/account/api-keys | ||
| url: https://transform.unstructured.io/get-started |
Summary
Unstructured Transform converts PDFs, DOCX, PPTX, HTML, images, and scanned pages into clean structured output.
Marketplace behavior
This updates the existing
langgenius/unstructuredMarketplace plugin. Once approved and merged, Dify's repository workflow packages and uploads version 0.0.10 to the Marketplace. Users will discover and install it from the existing Unstructured listing, then authenticate at runtime with their own Unstructured account and API key. No shared Unstructured credential is included in the plugin.Validation
uv run pytest -q(3 passed)uvx ruff format --check .uvx ruff check .dify plugin package ./unstructured