ai_code_convert
AI code converter (language to language) — Convert code between languages (python, javascript, typescript, java, csharp, go, rust, ruby, php, kotlin, swift, c, cpp, sql, bash). Source language auto-detected (or from=). Returns the converted code as plain text, the model's notes on behavior differences, and offline checks: detected output language vs target, leftover source-language syntax, TODO markers, line ratio, plus an OK/REVIEW verdict. Up to 12,000 chars. Workers AI. Price: $0.01 USDC (Base, via x402).
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": {
"code": "<code>",
"to": "<to>"
},
"name": "ai_code_convert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | e.g. javascript | |
| code | Yes | e.g. def add(a, b): return a + b |