list_ocr_languages
Retrieve supported languages and codes for optical character recognition to ensure accurate text extraction from images.
Instructions
列出 OCR 支持的语言及其代码
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_ocr_languages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:255-272 (handler)The implementation of the `list_ocr_languages` tool logic, which invokes `getSupportedLanguages()` and returns a formatted Markdown list of supported OCR languages.
case 'list_ocr_languages': { // 获取支持的语言列表 const languages = getSupportedLanguages(); // 格式化为 Markdown 列表 const languageList = languages .map((lang) => `- \`${lang.code}\`: ${lang.name}`) .join('\n'); return { content: [ { type: 'text', text: `## 支持的 OCR 语言\n\n${languageList}\n\n使用时将语言代码传入 \`languages\` 参数数组中,例如:\`["chi_sim", "eng"]\``, }, ], }; } - index.js:137-145 (registration)The tool registration block for `list_ocr_languages`, defining its name, description, and input schema.
{ name: 'list_ocr_languages', description: '列出 OCR 支持的语言及其代码', inputSchema: { type: 'object', properties: {}, // 无参数 required: [], // 无必填参数 }, },