Skip to main content
Glama

extract_text_from_screenshot

Extract text from screenshots with OCR, preserving code indentation and formatting. Supports terminal output, documents, and general text extraction.

Instructions

使用 OCR 从截图中提取和识别文字。专门用于代码、终端输出、文档和通用文本提取。

仅在用户需要以下操作时使用:

  • 从截图提取代码(保持正确缩进与格式)

  • 提取终端输出和日志

  • 提取文档和文本内容

不要用于:UI 转 code、错误诊断、图表分析。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes详细描述要分析/生成的内容
image_sourceYes本地文件路径或图片 URL
programming_languageNo可选:截图中的编程语言提示,提高准确性
Behavior3/5

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

With no annotations available, the description carries the burden of behavioral disclosure. It mentions OCR-based extraction and preserves formatting for code, which are useful behaviors. However, it does not disclose potential limitations like OCR accuracy on low-quality images or language support, nor what exactly is returned beyond 'text'. This is acceptable but not fully transparent.

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 concise and well-structured, using a clear opening line followed by bullet points for usage and exclusions. Every sentence contributes either to purpose, usage, or differentiation, with no redundancy.

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

Completeness4/5

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

Given the tool's moderate complexity and absence of an output schema, the description adequately covers what the tool is for, when to use it, and what not to use it for. It implies the output is extracted text, which is sufficient for this simple read-only tool. It could add a note about expected output format, but overall it is complete.

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

Parameters3/5

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

The schema covers all three parameters with descriptions, so the baseline is 3. The high-level description adds context about intended use cases (code, terminal, docs), which indirectly informs what the 'prompt' should contain, but it doesn't provide any new parameter-specific details beyond the schema. Thus it stays at baseline.

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

Purpose5/5

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

The description clearly states the tool's function: using OCR to extract and recognize text from screenshots, specifically for code, terminal output, documents, and general text. It explicitly distinguishes from siblings by listing what not to use it for (UI-to-code, error diagnosis, chart analysis), which maps directly to sibling tools.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use scenarios (extracting code, terminal output, documents) and a clear 'do not use for' list, giving strong guidance relative to alternatives. This goes beyond generic instructions by naming out-of-scope tasks.

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/JJChou000/glm-vision-mcp'

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