Skip to content

Commit 84005e6

Browse files
committed
Improve translate_texts tool description for better Claude.ai understanding
1 parent 97fd74a commit 84005e6

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

src/rosetta/api/mcp.py

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -492,18 +492,28 @@ def check_context(cls, v: Optional[str]) -> Optional[str]:
492492
),
493493
MCPTool(
494494
name="translate_texts",
495-
description="""Translate a list of text strings to a target language.
496-
497-
This is the simplest way to use Rosetta - just pass an array of texts and get back translated texts.
498-
Perfect for when Claude has already extracted text from a file and just needs translation.
499-
500-
Use this tool when you have text content that needs translation. You handle the file,
501-
Rosetta handles the translation with high-quality AI translation.
502-
503-
Example:
504-
Input: ["Hello", "How are you?", "Thank you"]
505-
Target: "french"
506-
Output: ["Bonjour", "Comment allez-vous ?", "Merci"]""",
495+
description="""Translate text strings to a target language using high-quality AI translation.
496+
497+
WHEN TO USE THIS TOOL:
498+
- User uploads an Excel/CSV file and wants it translated
499+
- User has text content that needs translation
500+
- User asks to translate anything to another language
501+
502+
HOW TO USE WITH FILES:
503+
1. When user uploads a file (Excel, CSV, etc.), read and parse the file content yourself
504+
2. Extract all text cells/values that need translation into an array
505+
3. Call this tool with the texts array and target language
506+
4. Use the returned translations to help the user (display them, create translated file, etc.)
507+
508+
WORKFLOW EXAMPLE:
509+
User: "Translate this Excel file to French"
510+
1. Read the uploaded Excel file
511+
2. Extract text values: ["Hello", "Product Name", "Description", ...]
512+
3. Call translate_texts(texts=["Hello", "Product Name", "Description"], target_language="french")
513+
4. Receive: ["Bonjour", "Nom du produit", "Description", ...]
514+
5. Present the translations to the user or help create the translated file
515+
516+
Supports 30+ languages including: english, french, spanish, german, italian, portuguese, dutch, russian, chinese, japanese, korean, arabic, hindi, and more.""",
507517
inputSchema=MCPToolInputSchema(
508518
properties={
509519
"texts": {

0 commit comments

Comments
 (0)