list_ocr_languages
Retrieve supported languages and codes for optical character recognition to ensure accurate text extraction from images.
Instructions
列出 OCR 支持的语言及其代码
Input Schema
TableJSON 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: [], // 无必填参数 }, },