Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ZAI_API_KEYNoYour z.ai API key. If not set, the server looks for ~/.config/zai/api-key.
ZAI_BASE_URLNoBase URL for z.ai API requests. Your key is sent to whatever host it names.https://api.z.ai/api/anthropic
GLM_MCP_ROOTSNoColon-separated absolute paths that confine file reads. When unset, the server is confined to the directory it was started in.
ZAI_MODELS_URLNoURL for the glm_models endpoint. Does not follow ZAI_BASE_URL.https://api.z.ai/api/paas/v4/models
GLM_MCP_MAX_DEPTHNoMaximum directory depth for glob walks.24
GLM_MCP_TIMEOUT_MSNoRequest timeout for the whole call, including retries.600000
GLM_MCP_GLOB_IGNORENoComma-separated list of directory names to skip during glob expansion. Replaces the default set; empty disables skipping.node_modules,.git,dist,build,coverage,.next,.turbo,vendor,target
GLM_MCP_MAX_ENTRIESNoMaximum directory entries examined per call.200000
GLM_MCP_PROGRESS_MSNoHeartbeat interval for MCP progress notifications on long calls. Only sent when the client provides a progress token.5000
GLM_MCP_ALLOW_ANY_PATHNoSet to '1' to turn off path confinement completely. Widens the roots; does not re-open credential files.
GLM_MCP_CONTEXT_TOKENSNoOverrides the context window used to derive the file character budget for every model at once.
GLM_MCP_MAX_FILE_BYTESNoPer-file size limit, checked before the file is read.5 MB
GLM_MCP_MAX_FILE_CHARSNoTotal context characters allowed for file content, headers and separators included.derived per model (~2.9M for GLM-5.3)
GLM_MCP_ALLOW_ZCODE_KEYNoSet to '1' to allow reading the z.ai key from ZCode's config (~/.zcode/v2/config.json). Opt-in only.
GLM_MCP_GLOB_TIMEOUT_MSNoWall-clock budget for glob expansion, checked between operations.10000
GLM_REVIEW_MIN_SUBSTANCENoLeast analysis (in characters) a glm_review verdict must have besides the verdict line. Lower or missing substance causes refusal.200
GLM_MCP_MAX_BRACE_EXPANSIONSNoTotal allowed {a,b} brace expansions in a single glob.1024

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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
glm_askA

Send a prompt to a Z.ai GLM model (default GLM-5.3) and return its answer. GLM-5.3 is an independent frontier model with a million-token context window, so this is useful for a genuine second opinion from a different model, for cross-checking reasoning, and for analysing far more source material at once than fits in a normal context. Optionally pass file paths to include as context. Model and reasoning are the latency levers: thinking tokens are generated before the first character of the answer, and the thinking budget spans 2,048 at 'low' against 24,576 at 'max' — a twelve-fold spread. Route mechanical work (extract, summarise, reformat, classify) to glm-5.3-flash or glm-4.6 at 'low'; glm-4.6 alone can go further, to 'none' — glm-5.3-flash cannot run with reasoning off, so its 'none' is raised to 'low'. Keep GLM-5.3 at 'high' or 'max' for design review, cross-checking reasoning, and hunting a subtle bug. glm-4.6 and glm-4.7 accept reasoning 'none'; GLM-5.3 and glm-5.3-flash cannot, so 'low' is their shallowest setting.

glm_reviewA

Review a change with a Z.ai GLM model (default GLM-5.3) and return a VERDICT: the reply is the reviewer's analysis and always ends with a final line that is exactly VERDICT: PASS or VERDICT: CHANGES_REQUIRED — the same vocabulary bin/glm-review reads, so a shell pipeline can consume the result. Pass the change as a unified diff and the requirement it was meant to implement as spec: review against intent is what catches silent scope-narrowing, and the reviewer is warned off both recorded pathologies — findings that are padded or fabricated, and work that is stubbed, mocked or hardcoded rather than implemented. A reply that is a bare verdict with no analysis behind it comes back as an error, never as a clean review. This server never runs git and inspects no repository state on its own: the diff comes from the caller, and files resolve exactly as glm_ask resolves them. Reviews default to reasoning 'high' — the depth the glm_ask routing guidance reserves for review and bug-hunting — and a different model than the one that wrote the code is worth choosing where you can, because a model re-reading its own work reliably under-reports.

glm_modelsA

List the GLM model ids available on the configured Z.ai account, each with a one-line role; an id this server's model table does not know is listed bare.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/No-Compromise-AI/glm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server