GLM MCP
v1.3.0GLM (Zhipu/Z.ai) as a ~10x cheaper file-editing subagent for AI coding agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
glm_agent Run GLM as a file-accessing agent
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; it also handles text-only subtasks (give it a task with no file edits). 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.
| Parameter | Type | Description |
|---|---|---|
task * | string | The coding task for GLM to carry out end-to-end in the repo. |
context | string | Optional extra context/constraints (GLM can also read files itself). |
dry_run | boolean | If true, GLM proposes a diff and writes nothing (preview before applying). Default false. |
format | string | concise (default: summary+stats+changed files) or detailed (adds full diff). dry_run always shows the diff. |
max_tokens | 'auto' (default): uncapped/generous per turn — you (the orchestrating agent) decide. Pass a number (256–131072) to cap each turn. (GLM_CAP=on enforces a hard limit regardless.) | |
model | string | Model id or 'auto' (default, peak-aware). |
thinking | boolean | Enable GLM reasoning mode for harder tasks. Default false. |
workdir | string | Absolute path to the project root GLM should operate in. Defaults to the server's cwd; always pass it explicitly. |
glm_recommend Recommend GLM vs Opus for a task
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.
| Parameter | Type | Description |
|---|---|---|
chinese | boolean | True if Chinese or Chinese-English bilingual (GLM strength, +1). |
complexity | string | Default 'medium'. |
input_tokens | integer | Approx context size needed. >128K forces Opus (GLM degrades past ~100K). |
latency_sensitive | boolean | True if a tight interactive loop (forces Opus). |
long_horizon | boolean | True if many sequential steps / multi-hour autonomy. |
needs_parallel | boolean | True if it needs several concurrent agents (forces Opus). |
sensitive | boolean | True if proprietary/security-critical (forces Opus). |
steps | integer | Approx number of dependent sequential steps. >20 forces Opus (goal drift). |
task_type | string | Closest task category. Default 'general'. |
tool_pattern | string | Tool-use shape: single one-shot call / short independent fanout (GLM-ok) vs heavy dependent agentic loop (forces Opus). |
unfamiliar_api | boolean | True if it uses a niche/post-cutoff/internal API GLM can't know (-2; paste docs or use Opus). |
vision | boolean | True if input includes images/screenshots/GUI/computer-use (forces Opus). |
glm_status GLM status & config
Free local status: peak window, active model, GLM usage ledger (proof of GLM tokens spent), and config health. No GLM call.