Run GLM as a file-accessing agent
glm_agentRun repository coding tasks end-to-end using GLM as an agent with file tools. Provides a concise summary and stats; use dry_run to preview changes before applying.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | The coding task for GLM to carry out end-to-end in the repo. | |
| model | No | Model id or 'auto' (default, peak-aware). | |
| format | No | concise (default: summary+stats+changed files) or detailed (adds full diff). dry_run always shows the diff. | |
| context | No | Optional extra context/constraints (GLM can also read files itself). | |
| dry_run | No | If true, GLM proposes a diff and writes nothing (preview before applying). Default false. | |
| workdir | No | Absolute path to the project root GLM should operate in. Defaults to the server's cwd; always pass it explicitly. | |
| thinking | No | Enable GLM reasoning mode for harder tasks. Default false. | |
| max_tokens | No | Max output tokens per turn (ceiling; billed for actual). Default generous. |