GLM Subagent MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GLM_CAP | No | Output-token cap. Off by default = generous (up to 131072 per call). Set on to enforce GLM_MAX_TOKENS. Default: off | off |
| GLM_API_KEY | Yes | Your Z.ai API key with GLM Coding Plan access. Required. | |
| GLM_BASE_URL | No | Anthropic-compatible endpoint. Default: https://api.z.ai/api/anthropic | https://api.z.ai/api/anthropic |
| GLM_COST_BIAS | No | How hard to favor GLM (it's ~10x cheaper). Higher = more GLM; 0 = decide on capability only. Default: 1.5 | 1.5 |
| GLM_MAX_TOKENS | No | The hard per-call limit applied only when GLM_CAP=on. Default: 32768 | 32768 |
| GLM_PEAK_MODEL | No | Model used during China peak. Default: glm-5.2 | glm-5.2 |
| GLM_PEAK_END_CN | No | Peak window end (China hour, UTC+8). Default: 18 | 18 |
| GLM_OFFPEAK_MODEL | No | Model used off-peak. Default: glm-5.2 | glm-5.2 |
| GLM_PEAK_START_CN | No | Peak window start (China hour, UTC+8). Default: 14 | 14 |
| GLM_MAX_CONCURRENT | No | GLM caps in-flight requests; keep at 1. Default: 1 | 1 |
| GLM_AGENT_MAX_ITERS | No | Max tool-loop turns for glm_agent. Default: 30 | 30 |
| GLM_MAX_TOKENS_CEILING | No | The generous default used when the cap is off. Default: 131072 | 131072 |
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": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| glm_delegateA | Text-in/text-out subtask on GLM (~10x cheaper than Opus); returns text only. GLM has no file/tool access -- put everything in task+context. For file edits use glm_agent instead. Not for sensitive, long-debugging, large-refactor, or parallel work. |
| glm_agentA | Run GLM as a real coding agent with its OWN file tools (read/write/edit/list/bash); it works your repo end-to-end on GLM tokens (~10x cheaper than Opus). Prefer this over doing repo work yourself. Pass task + absolute workdir. Returns a concise summary+stats (use dry_run to preview a diff first). Not for sensitive, huge-context, or heavy dependent-tool-loop work. |
| glm_recommendA | Free local advisory (no GLM call): given a task profile, returns GLM-vs-Opus, model, confidence, and reasons. Call when unsure which engine to use. |
| glm_statusA | Free local status: peak window, active model, GLM usage ledger (proof of GLM tokens spent), and config health. No GLM call. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: glm_agent performs full repo work with file access, glm_delegate handles text-only subtasks, glm_recommend advises on model choice, and glm_status shows usage and config. There is no overlap or ambiguity.
All tool names follow a consistent 'glm_' prefix followed by a descriptive word (agent, delegate, recommend, status). The pattern is uniform with lowercase and underscores, making it easy to understand each tool's function.
With 4 tools, the set is well-scoped for the server's purpose of providing GLM subagent capabilities. Each tool justifies its existence, covering distinct modes of interaction without unnecessary bloat or deficiency.
The tool surface covers the full lifecycle: doing work (agent and delegate), getting advice on which to use (recommend), and monitoring usage (status). There are no obvious gaps for the intended use case of a GLM subagent.