Skip to content

Implement translate-document tool for translating documents via the DeepL API #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

j-christl
Copy link

Context

So far, only the text translation and text rephrasing functionality of DeepL is exposed via MCP tools.
This change adds a tool for translating documents via the DeepL API. This allows the user/LLM to translate documents such as *.pdf, *.docx and more (see "Document Formats" resource below).

Example usage

Request:

Please translate this file into german (de): /Users/myuser/Downloads/my_document.pdf

Response:

[...]
Perfect! ✅ Your PDF has been successfully translated from the original language to German. The translated document has been saved as /tmp/my_document de.pdf.

Limitations

Currently, Claude cannot transmit files via the MCP protocol that have been drag&dropped into Claude Desktop. Hence, this implementation depends on the user specifying the path of the file, rather than drag&dropping the file into Claude Desktop.

Resources

@j-christl j-christl changed the title feat: Implemented translate-document tool Implement translate-document tool for translating documents via the DeepL API Jun 27, 2025
Copy link
Collaborator

@morsssss morsssss left a comment

Choose a reason for hiding this comment

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

Sorry - I didn't realize that no one had looked at your PR!

So... I wonder if we could support files in a more natural way, via one of two mechanisms:

  • files brought into the flow from use of a tool like https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem . In such a case, we'd get the file from their read_text_file, read_media_file, or read_multiple_files methods. Not sure whether this would be a common use case, but for users who'd installed a filesystem tool, we'd enable them to ask their AI client something like "Can you find that file in my Downloads folder that has Greek in it, and translate that into Spanish?"

  • This resource, at least, tells us that LLMs have various ways of working with files. It does talk about Claude's way in particular.

Are you up for investigating either of these?

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.

2 participants