glm-ocr-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZHIPU_API_KEY | No | Your Zhipu API key (can also be set via config.json). | |
| GLMOCR_API_KEY | No | Alternative environment variable for the API key (overridden by ZHIPU_API_KEY). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ocr_imageA | OCR 单张图片并返回 Markdown。 source 支持:本地文件路径(如 D:/a.png)、file:// URL、 http(s) URL、data URI(data:image/png;base64,...)。 返回 {"status":"ok", "markdown":..., "json_result":[...], "usage":...}; 失败时 status="error" 并附 error 信息。 |
| ocr_pdfA | OCR PDF 文件并返回 Markdown(小文件直接调用;超大 PDF 建议用 start_pdf_ocr 异步执行)。 path 为本地 PDF 文件路径;pages 为页码范围(1-indexed 闭区间): "all" 全部、"5" 第 5 页、"3-10" 第 3~10 页。 大文件自动按每片 8 页切分、逐片识别后合并,临时文件用后即删。 识别期间通过 MCP 进度通知推送百分比与预计剩余时间(客户端需在调用时 附带 progressToken 才能收到)。 返回 {"status":"ok", "markdown":..., "pages":[...], "chunk_count":..., "usage":...}。 |
| ocr_long_imageA | 长条图片切片识别并返回 Markdown。 适用于超长截图(聊天记录、网页长图、试卷长图等):图片任一维度超过 slice_height(默认 3000 像素,可调)时,自动沿超限轴切成多条带重叠的 切片,逐条 OCR 后按行级重叠去重合并,避免切分处文字截断或重复。 slice_height 与 overlap 均可不传(取 config.json 配置,默认 3000/200)。 source 支持:本地路径 / http(s) URL / data URI,格式 png/jpg/jpeg/ webp/bmp/tiff/gif 等。返回 {"status":"ok", "markdown":..., "size":{...}, "chunk_count":..., "chunks":[{index,x,y,markdown,...}]}。 |
| start_pdf_ocrA | 异步启动 PDF OCR,立即返回 task_id(适用于超大 PDF,避免长时间阻塞调用)。 任务在后台执行,用 get_ocr_status(task_id) 随时查询进度(percent / eta_seconds / elapsed_seconds / chunk / chunk_count / message),完成后 record 的 result 字段包含 markdown;不需要时可用 cancel_ocr_task 取消。 |
| get_ocr_statusA | 查询异步 OCR 任务进度。 返回 {task_id, status(queued/running/done/error/cancelled), percent, chunk, chunk_count, elapsed_seconds, eta_seconds, message, error, result(仅 done 时,含 markdown)};任务不存在返回 {"status":"error"}。 建议在任务运行期间每隔 1-5 分钟查询一次并向用户汇报进度。 |
| cancel_ocr_taskA | 取消异步 OCR 任务(在当前分片结束后生效,已识别内容不返回)。 |
| doctorA | 环境自检:依赖、API Key 配置是否就绪(不调用 OCR API)。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/stellarum-J/glm-ocr-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server