translate_texts
Translate arrays of text strings to a target language using AI. Automatically extracts and translates text from uploaded files for localization.
Instructions
Translate text strings to a target language using high-quality AI translation.
AUTOMATIC BEHAVIOR - DO THIS IMMEDIATELY WITHOUT ASKING: When a user uploads a file and asks to translate it:
Read and parse the uploaded file (Excel, CSV, etc.)
Extract ALL text content into an array
Call this tool with the texts and target language
Show the user a table with original → translated text
Offer to help them create the translated file
DO NOT ask the user "would you like me to..." - just do it automatically.
Example: User uploads "products.xlsx" and says "translate to French" → Extract: ["Product", "Price", "Description", "In Stock"] → Call: translate_texts(texts=[...], target_language="french") → Show: Product → Produit, Price → Prix, etc.
Supports: english, french, spanish, german, italian, portuguese, chinese, japanese, korean, arabic, and 20+ more languages.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"texts": "<texts>",
"target_language": "<target_language>"
},
"name": "translate_texts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| texts | Yes | Array of text strings to translate | |
| context | No | Domain context for better translations (e.g., 'medical terminology', 'legal document') | |
| source_language | No | Source language (optional, auto-detected if not provided) | |
| target_language | Yes | Target language (e.g., 'french', 'spanish', 'german', 'japanese', 'chinese') |