Skip to main content
Glama

Report a usage limit

limit_reached
Idempotent

Reports that an AI program of the owner (Claude Code, Codex, Cursor) reached its usage limit in a chat, so another AI of the owner finishes that chat's last request. Meant for the program's own hook, which still runs when the model cannot answer any more: in Claude Code the StopFailure hook with matcher rate_limit and type mcp_tool, with input app "claude_code", session_id "${session_id}", folder "${cwd}", transcript_path "${transcript_path}", message "${last_assistant_message}" and error "${error}". It works only while the owner switched on "continue in another AI at the limit" on their Prometheor account page; Prometheor then picks an AI that is not at this limit, gives it one task with the chat's folder and chat file, and gives no second task for the same chat and limit. Do not call it for anything but a usage limit, and never to hand over ordinary work (use delegate for that). Setting the hook up on the owner's request: called with app "claude_code", session_id "setup" and error "setup_check" it hands nothing over and answers with limit_setup, the hook and the steps; with error "setup_done" it ends that setup and, on the owner's request in this chat, switches "continue in another AI at the limit" on for their account (never off).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "app": "<app>",
      "session_id": "<session_id>"
    },
    "name": "limit_reached"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesThe program that reached its limit.
errorNoThe program's own word for why the turn ended, e.g. rate_limit.
titleNoOptional. The chat's title.
folderNoThe folder the chat works in.
messageNoThe program's last message, usually the limit notice with the reset time.
session_idYesThe program's own id of the chat.
transcript_pathNoThe chat's own file on the owner's computer; an AI on that computer reads it before it goes on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag a mutating, non-open-world, idempotent tool, and the description explains why: no second task is given for the same chat and limit (idempotency), and setup_done can switch an account setting on but never off (mutation). It discloses prerequisites (owner must have enabled 'continue in another AI at the limit') and what Prometheor actually does with the handover, which goes well beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and every section is functional, but the body is a dense single paragraph with run-on sentences that nest quote marks and conditionals, making the setup-mode branch hard to parse. A short separated section for the setup path would preserve the content while cutting reading effort; the account-setting name is also restated needlessly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-mode tool with no output schema, the description covers prerequisites, side effects, idempotency, the alternative tool, and even what setup_check returns ('answers with limit_setup, the hook and the steps'). An agent has everything needed to invoke it correctly in either mode.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning the schema lacks: the special session_id value 'setup' and error values 'setup_check'/'setup_done' form a protocol not documented anywhere in the input schema, and the hook snippet shows what each field should carry. It stops short of explaining the optional title/folder/message fields beyond the schema's own descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a precise verb and event ('Reports that an AI program ... reached its usage limit in a chat') and the downstream effect ('another AI of the owner finishes that chat's last request'), which lets an agent tell it apart from delegate without opening either schema. It also carves out the setup-mode variant explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

States when to use ('only for a usage limit'), when not to ('never to hand over ordinary work'), and names the alternative ('use delegate for that'). It further spells out the two setup sub-cases (error 'setup_check' vs 'setup_done') and the account-setting precondition that gates the whole behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources