zai-mcp-server Image Recognition Tools Not Working with GLM-4.7 Model - Other Models (CC/Droid) Work Correctly #9470

Open
opened 2026-02-16 18:12:31 -05:00 by yindo · 2 comments
Owner

Originally created by @zwen64657 on GitHub (Feb 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Description
Image recognition tools provided by zai-mcp-server (such as diagnose_error_screenshot) return generic templates instead of actual image content when called by the GLM-4.7 model. Other AI tools (CC, Droid) using the same zai-mcp-server tools can successfully recognize and output correct image content on the first attempt.
Reproduction Steps

  1. Upload an image (Esperanto exercise screenshot: C:\Users\18773\Desktop\51-60\59\slide_0034.jpg)
  2. Use GLM-4.7 model in opencode to call zai-mcp-server's diagnose_error_screenshot tool
  3. Tool execution completes without errors
  4. Observe the returned result - returns a generic template instead of actual image content analysis
  5. Switch to CC or Droid model and perform the same operation
  6. Successfully obtain correct analysis results based on actual image content
    Expected Behavior
    zai-mcp-server's image recognition tools should correctly analyze and return results based on actual image content when used with the GLM-4.7 model, behaving consistently with other models (CC, Droid).
    Actual Behavior
    Incorrect output from GLM-4.7 model:

Error Analysis: Image Processing with zai-mcp-server

Error Summary

Based on the context you've provided, it appears you encountered an error...
[Generic template, does not read or analyze actual image content]
Correct output from other models (CC/Droid):
[Correct analysis based on actual image content]
Tool Call Details
zai-mcp-server tool called by GLM-4.7:
zai-mcp-server_diagnose_error_screenshot

  • image_source: "C:\Users\18773\Desktop\51-60\59\slide_0034.jpg"
  • prompt: "What does this error mean and how can it be fixed?"
  • context: "When trying to process an image with zai-mcp-server"
    Comparison Test Results
    Model zai-mcp-server Tool Call Status Return Result Image Recognition
    CC diagnose_error_screenshot Success Correct Content Full Recognition
    Droid diagnose_error_screenshot Success Correct Content Full Recognition
    GLM-4.7 diagnose_error_screenshot Success Generic Template Not Recognized
    Environment Information
  • MCP Server: zai-mcp-server
  • Problematic Model: GLM-4.7 (zhipuai-coding-plan/glm-4.7)
  • Working Models: CC, Droid
  • Platform: Windows (win32)
  • Working Directory: C:\Users\18773
  • Image Path: C:\Users\18773\Desktop\51-60\59\slide_0034.jpg
    Root Cause Analysis
  1. zai-mcp-server tools function correctly (verified by CC, Droid models)
  2. The issue lies in the interaction between GLM-4.7 model and zai-mcp-server
  3. Possible causes:
    • GLM-4.7 model has defective logic for parsing zai-mcp-server responses
    • zai-mcp-server lacks compatibility handling for GLM-4.7 model requests
    • Image transmission method has issues under GLM-4.7
      Suggestions
  4. Check if zai-mcp-server uses differentiated response formats for different models
  5. Verify that the request parameter format is correct when GLM-4.7 calls zai-mcp-server
  6. Add debug logging for zai-mcp-server tools to examine differences between GLM-4.7 requests and CC/Droid requests
  7. Consider adding special compatibility handling for GLM-4.7 model on the zai-mcp-server side

Image

session-ses_3992.md

Plugins

No response

OpenCode version

1.2.5

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows 11 25H2 26200.7840

Terminal

No response

Originally created by @zwen64657 on GitHub (Feb 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Description Image recognition tools provided by zai-mcp-server (such as diagnose_error_screenshot) return generic templates instead of actual image content when called by the GLM-4.7 model. Other AI tools (CC, Droid) using the same zai-mcp-server tools can successfully recognize and output correct image content on the first attempt. Reproduction Steps 1. Upload an image (Esperanto exercise screenshot: C:\Users\18773\Desktop\51-60\59\slide_0034.jpg) 2. Use GLM-4.7 model in opencode to call zai-mcp-server's diagnose_error_screenshot tool 3. Tool execution completes without errors 4. Observe the returned result - returns a generic template instead of actual image content analysis 5. Switch to CC or Droid model and perform the same operation 6. Successfully obtain correct analysis results based on actual image content Expected Behavior zai-mcp-server's image recognition tools should correctly analyze and return results based on actual image content when used with the GLM-4.7 model, behaving consistently with other models (CC, Droid). Actual Behavior Incorrect output from GLM-4.7 model: # Error Analysis: Image Processing with zai-mcp-server ## Error Summary Based on the context you've provided, it appears you encountered an error... [Generic template, does not read or analyze actual image content] Correct output from other models (CC/Droid): [Correct analysis based on actual image content] Tool Call Details zai-mcp-server tool called by GLM-4.7: zai-mcp-server_diagnose_error_screenshot - image_source: "C:\Users\18773\Desktop\51-60\59\slide_0034.jpg" - prompt: "What does this error mean and how can it be fixed?" - context: "When trying to process an image with zai-mcp-server" Comparison Test Results | Model | zai-mcp-server Tool | Call Status | Return Result | Image Recognition | |-------|-------------------|-------------|---------------|-------------------| | CC | diagnose_error_screenshot | ✅ Success | ✅ Correct Content | ✅ Full Recognition | | Droid | diagnose_error_screenshot | ✅ Success | ✅ Correct Content | ✅ Full Recognition | | GLM-4.7 | diagnose_error_screenshot | ✅ Success | ❌ Generic Template | ❌ Not Recognized | Environment Information - MCP Server: zai-mcp-server - Problematic Model: GLM-4.7 (zhipuai-coding-plan/glm-4.7) - Working Models: CC, Droid - Platform: Windows (win32) - Working Directory: C:\Users\18773 - Image Path: C:\Users\18773\Desktop\51-60\59\slide_0034.jpg Root Cause Analysis 1. zai-mcp-server tools function correctly (verified by CC, Droid models) 2. The issue lies in the interaction between GLM-4.7 model and zai-mcp-server 3. Possible causes: - GLM-4.7 model has defective logic for parsing zai-mcp-server responses - zai-mcp-server lacks compatibility handling for GLM-4.7 model requests - Image transmission method has issues under GLM-4.7 Suggestions 1. Check if zai-mcp-server uses differentiated response formats for different models 2. Verify that the request parameter format is correct when GLM-4.7 calls zai-mcp-server 3. Add debug logging for zai-mcp-server tools to examine differences between GLM-4.7 requests and CC/Droid requests 4. Consider adding special compatibility handling for GLM-4.7 model on the zai-mcp-server side ![Image](https://github.com/user-attachments/assets/54937f0d-c47b-472b-8c77-9e64b6747c53) [session-ses_3992.md](https://github.com/user-attachments/files/25343696/session-ses_3992.md) ### Plugins _No response_ ### OpenCode version 1.2.5 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System windows 11 25H2 26200.7840 ### Terminal _No response_
yindo added the windowsbug labels 2026-02-16 18:12:31 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 16, 2026):

This issue appears related to existing GLM-4.7 MCP/tool issues:

  • #13310: Z.AI GLM-4.7 cannot read images from Read tool (vision support issue)
  • #8102: MCP Tool JSON Parsing Errors on OpenCode with GLM-4.7 (invalid tool argument formatting)

These may share a common root cause in how GLM-4.7 handles MCP tool responses and vision-related operations.

@github-actions[bot] commented on GitHub (Feb 16, 2026): This issue appears related to existing GLM-4.7 MCP/tool issues: - #13310: Z.AI GLM-4.7 cannot read images from Read tool (vision support issue) - #8102: MCP Tool JSON Parsing Errors on OpenCode with GLM-4.7 (invalid tool argument formatting) These may share a common root cause in how GLM-4.7 handles MCP tool responses and vision-related operations.
Author
Owner

@zwen64657 commented on GitHub (Feb 16, 2026):

I've also encountered issues such as connection timeouts

@zwen64657 commented on GitHub (Feb 16, 2026): I've also encountered issues such as connection timeouts
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9470