[FEATURE]: Add GLM specific system prompt support to better make use of GLM coding plan with it's MCPs. #8289

Open
opened 2026-02-16 18:09:36 -05:00 by yindo · 6 comments
Owner

Originally created by @MAHakeem-MK on GitHub (Feb 1, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

The current system prompt is not optimized for GLM, leading to sub-optimal responses.

Solution

Addition of optimized system prompt which includes instructions to use MCPs provided by GLM coding plan such as vision MCP server, Web search MCP server, Web reader MCP server etc. instead of the built-in tools such as Exa or web-fetch(fallback to this when the GLM MCP servers are not configured).

Proposed Changes

  1. add optimized glm.txt in prompt directory.
  2. add import PROMPT_GLM from "./prompt/glm.txt" in system.ts
  3. add if (model.api.id.includes("glm-")) return [PROMPT_GLM] in system.ts.
Originally created by @MAHakeem-MK on GitHub (Feb 1, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ### Problem The current system prompt is not optimized for GLM, leading to sub-optimal responses. ### Solution Addition of optimized system prompt which includes instructions to use MCPs provided by GLM coding plan such as vision MCP server, Web search MCP server, Web reader MCP server etc. instead of the built-in tools such as Exa or web-fetch(fallback to this when the GLM MCP servers are not configured). ### Proposed Changes 1. add optimized glm.txt in prompt directory. 2. add `import PROMPT_GLM from "./prompt/glm.txt"` in system.ts 3. add `if (model.api.id.includes("glm-")) return [PROMPT_GLM]` in system.ts.
yindo added the discussion label 2026-02-16 18:09:36 -05:00
Author
Owner

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

This issue might be a duplicate of existing issues. Please check:

  • #6024: [FEATURE]: Provider/Model-specific MCP servers - This feature request addresses a similar need of configuring MCP servers conditionally based on model/provider. Your proposal for a GLM-specific system prompt is complementary to this, as both aim to optimize the experience for GLM-specific MCPs.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 1, 2026): This issue might be a duplicate of existing issues. Please check: - #6024: [FEATURE]: Provider/Model-specific MCP servers - This feature request addresses a similar need of configuring MCP servers conditionally based on model/provider. Your proposal for a GLM-specific system prompt is complementary to this, as both aim to optimize the experience for GLM-specific MCPs. Feel free to ignore if none of these address your specific case.
Author
Owner

@MAHakeem-MK commented on GitHub (Feb 2, 2026):

I have customized the system prompt in the above described way locally and tested , found that it improved the GLM-4.7's agentic workflow.

what improved:

  1. earlier most of the time the agent ignored the AGENTS.md now it is considering it before anything else.
  2. earlier the agent failed to use question tool, now it is making use of it.
  3. earlier the agent some time failed to use the todo tool, now it is effectively using it before doing the tasks.
  4. agent uses websearchprime(the search MCP provided by GLM coding plan) instead of Exa, which leads to better search success rate.
  5. earlier the agent was some time failed to use skills, now it is considering skill before doing the task.
Image
@MAHakeem-MK commented on GitHub (Feb 2, 2026): I have customized the system prompt in the above described way locally and tested , found that it improved the GLM-4.7's agentic workflow. **what improved:** 1. earlier most of the time the agent ignored the AGENTS.md now it is considering it before anything else. 2. earlier the agent failed to use question tool, now it is making use of it. 3. earlier the agent some time failed to use the todo tool, now it is effectively using it before doing the tasks. 4. agent uses websearchprime(the search MCP provided by GLM coding plan) instead of Exa, which leads to better search success rate. 5. earlier the agent was some time failed to use skills, now it is considering skill before doing the task. <img width="1203" height="794" alt="Image" src="https://github.com/user-attachments/assets/cdb3c160-c2c5-4eea-8595-a525966ef905" />
Author
Owner

@yan97ao commented on GitHub (Feb 3, 2026):

Why not using skills?

@yan97ao commented on GitHub (Feb 3, 2026): Why not using skills?
Author
Owner

@bdwelle commented on GitHub (Feb 5, 2026):

@MAHakeem-MK so what is your GLM-specific system prompt?

@bdwelle commented on GitHub (Feb 5, 2026): @MAHakeem-MK so what is your GLM-specific system prompt?
Author
Owner

@heimoshuiyu commented on GitHub (Feb 6, 2026):

Not all glm users enable and want to use their MCP services

@heimoshuiyu commented on GitHub (Feb 6, 2026): Not all glm users enable and want to use their MCP services
Author
Owner

@MAHakeem-MK commented on GitHub (Feb 6, 2026):

@heimoshuiyu there is fallback option, if it is not available or fail it will use in-built tools instead. The system prompt not only taking care of GLM specific MCPs but also improve overall tool calling, skill calling, question tool and todo tool usage.

@MAHakeem-MK commented on GitHub (Feb 6, 2026): @heimoshuiyu there is fallback option, if it is not available or fail it will use in-built tools instead. The system prompt not only taking care of GLM specific MCPs but also improve overall tool calling, skill calling, question tool and todo tool usage.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8289