Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: [],     // 无必填参数
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. The description only states what the tool does ('list languages and codes') without revealing any behavioral traits such as whether it's a read-only operation, if it requires authentication, rate limits, or what format the output takes. For a tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the tool's function with zero wasted words. It's appropriately sized for a simple listing tool and front-loads the core purpose immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (zero parameters, no output schema, no annotations), the description is minimally complete for what it does. However, it lacks context about the output format (e.g., list structure, code format) and doesn't connect to the sibling tool 'recognize_text'. For a tool with no structured output documentation, the description should ideally provide more about what information is returned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100% (empty schema is fully described as having no parameters). With no parameters to document, the description doesn't need to add parameter semantics beyond what the schema provides. A baseline of 4 is appropriate for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('列出' meaning 'list') and resource ('OCR支持的语言及其代码' meaning 'OCR supported languages and their codes'). It distinguishes itself from the sibling 'recognize_text' by focusing on listing languages rather than performing text recognition. However, it doesn't explicitly differentiate from potential other language-related tools beyond the single sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'recognize_text' or explain that this tool is for discovering available languages before performing OCR operations. There's no context about prerequisites, timing, or use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wenxint/ocp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server