Tool calling
GLM-5 models on OpenRouter support tools and tool_choice, the building blocks of an agent loop.
Use case · agentic engineering

§ 01What it does well
GLM-5 models on OpenRouter support tools and tool_choice, the building blocks of an agent loop.
Z.ai designed the family for tasks that run for many steps: plan, act, observe, revise.
About one million tokens lets an agent keep a whole project and its history in view.
Agents resend context on every step; GLM's low input prices keep that affordable.
§ 02Prompts
Open any prompt in the chat, then replace the bracketed parts with your own material.
Help me design an AI agent that [goal]. List the tools it needs (name, inputs, outputs), the main loop, how it decides it is done, and the three most likely failure modes with mitigations.
Write a system prompt for an agent that [task]. Include its role, the tools it may call, rules for when to ask the user, and the exact output format for its final answer.
Here is a log of my agent's run where it went wrong. Find the step where it first made a bad decision, explain why, and suggest a change to the prompt or tools. [paste log]
§ 03Tips
§ 04FAQ
Z.ai positions GLM-5.3 for long-horizon agent tasks. GLM-5.3 Prime is the faster variant, and GLM-5.3 Flash is the cheap, multimodal option.
No. The chat has no tools. Use it to design prompts and debug logs, then run the agent through the API.
Yes. On OpenRouter they list tools and tool_choice among their supported parameters.
§ 05More
Try it now
No account, no card, no install. Type a question and watch GLM-5.3 Flash answer in seconds — switch to GLM-5.3 for the hardest problems.