refactor(knowledge): remove sandbox dependency for DingTalk document upload#3
Merged
parabala merged 1 commit intofeature/dingtalk-upload-knowledgefrom Apr 27, 2026
Conversation
…upload Add new MCP tools to replace sandbox exec for DingTalk document upload: 1. dingtalk_upload_file_from_url: Download file from URL and upload to Wegent - Downloads file from DingTalk download_url - Automatically manages temporary files - Returns attachment_id for wegent_kb_create_document 2. dingtalk_upload_content: Save content to file and upload to Wegent - Writes content to temporary file - Supports configurable encoding - Returns attachment_id for wegent_kb_create_document Both tools: - Use tempfile module for secure temporary file handling - Clean up temporary files after upload (in finally block) - Integrate with existing context_service.upload_attachment Update SKILL.md: - Remove all sandbox exec references - Document new helper tools - Update workflow and examples Update server.py: - Import dingtalk_upload module for tool registration Fixes secret
parabala
added a commit
that referenced
this pull request
Apr 27, 2026
…dge-skill refactor(knowledge): remove sandbox dependency for DingTalk document upload
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.
Summary
Remove sandbox exec dependency for DingTalk document upload by introducing dedicated MCP tools.
Changes
New MCP Tools (app/mcp_server/tools/dingtalk_upload.py)
dingtalk_upload_file_from_url - Downloads file from URL and uploads to Wegent
dingtalk_upload_content - Saves content to file and uploads to Wegent
Updated Files
Why
Previously, uploading DingTalk documents required using sandbox exec commands with curl, which:
The new approach:
Test Plan