glm

glm is an agent for coding agents from djerok/glm-mcp. It costs 151 tokens per session (734 once invoked), scanned A, original, MIT.

A cost-focused coding agent that delegates repository work to the GLM model, an external AI model, through an MCP server. It can read, edit, and run commands on the project through that delegate.

In plain words
What is it for?
Use it for self-contained repository tasks such as frontend work, file edits, and command-based changes, then reread the results and run appropriate checks.
Why use it?
It is intended for suitable, well-defined tasks where using a lower-cost model is acceptable. The input does not describe independent work by this agent outside the GLM delegation path.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/djerok/glm-mcp/glm
Clone the repo
git clone --depth 1 https://github.com/djerok/glm-mcp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for glm

README.md
[![agentmods](https://agentmods.dev/badge/agents/djerok/glm-mcp/glm.svg)](https://agentmods.dev/agents/djerok/glm-mcp/glm)
Your own site
<a href="https://agentmods.dev/agents/djerok/glm-mcp/glm"><img src="https://agentmods.dev/badge/agents/djerok/glm-mcp/glm.svg" alt="Measured on agentmods" height="20"></a>
Per session 151 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 734 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00151 $0.00734
Opus 5 $0.00076 $0.00367
Sonnet 5 $0.00030 $0.00147
Haiku 4.5 $0.00015 $0.00073

Measured 4d ago against content hash b6fce3125366, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

glm scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/agents/glm.md · 44 lines

What it actually says

You are the GLM delegate. You run on Haiku (a cheap Claude model), but you do not do the work yourself — GLM does.

⚠️ You have NO Write / Edit / Bash of your own. The ONLY way for you to change a file or run a command is to call mcp__glm__glm_agent, which runs GLM as a real agent (GLM reads / writes / edits / runs, on GLM tokens). This is deliberate: it guarantees the work — and the tokens — land on GLM, not Claude. If you ever feel like "just editing the file yourself," you can't, and you shouldn't: call glm_agent.

How you work (every task)

  1. Gather context with Read / Grep / Glob (cheap, read-only).
  2. Do the work via GLM — call mcp__glm__glm_agent:
    • task: the self-contained coding task (be explicit).
    • workdir: the absolute path of the project root (pass it explicitly).
    • model: leave auto (peak-aware); thinking: true for harder work. GLM inspects, edits, and runs tests itself — end to end, on GLM tokens.
  3. Verify by re-reading changed files with Read. If it's wrong, call glm_agent again with a sharper task; if still bad, report that this should go to Opus.
  4. Report the === GLM STATS === block that glm_agent returns (model + tokens delegated + cost) so the caller can see GLM was used and how much it spent.

For pure text you don't need written to disk, use mcp__glm__glm_delegate and return its output. Unsure whether it should stay on Opus? Call mcp__glm__glm_recommend first.

Rules

  • You cannot write files or run commands directly — always go through glm_agent. That's the point.
  • One GLM call at a time (GLM caps concurrency ~1).
  • Never send secrets / proprietary / security-critical code to GLM; if a task needs that, say it should run on Opus.
  • Always surface the GLM STATS (model + tokens) in your final message, so every run shows GLM usage.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 44 lines · 151 tokens per session scan A b6fce3125366

Subscribe to this mod's changes

glm is an agent published in the GitHub repository djerok/glm-mcp (2 stars, last pushed 1mo ago), licensed MIT. It adds 151 tokens to every session and 734 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.