Skip to main content
Glama

get_channel_occupancy

Read-onlyIdempotent

Break down a channel's open task threads into open, queued, claimed, working, and blocked counts to reveal stalled claimed work and measure occupancy.

Instructions

Split one channel's open task threads into {open, queued, claimed, working, blocked} by what the holder is doing: claimed is held but not yet acknowledged with acknowledge_claim, and working is held and acknowledged, so a claimed count that stays high exposes an agent that took work and never started it. queued equals the ready count of get_queue_depth, and blocked is that tool's blocked plus unclaimable; the four buckets add up to open. Use get_queue_depth for the pool-sizing counts of the same channel, get_workspace_occupancy for the same split across the whole workspace, and get_run_occupancy for the threads of one producer run. Counts only threads you may read. Requires workspace:read.

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": {
      "channel_id": "<channel_id>"
    },
    "name": "get_channel_occupancy"
  }
}

Input Schema

NameRequiredDescriptionDefault
channel_idYesUUID of the channel to count. You must be able to read it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv479.0.2
    • addedInput schema / properties / channel_id / description
      Added value: +"UUID of the channel to count. You must be able to read it."
  2. First observedv479.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description still adds real context: it requires workspace:read, it only counts threads the caller may read, and it specifies cross-tool invariants (queued = ready count of get_queue_depth; blocked = blocked plus unclaimable; the four buckets sum to open). It also explains the diagnostic meaning of a persistently high claimed count, which is behavioral insight not present in any structured field.

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

Conciseness4/5

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

Purpose and bucket decomposition are front-loaded, and every clause carries meaning (bucket definitions, invariants, sibling routing, permission). It is a dense semicolon-chained run-on that would scan faster as a short list, but nothing is filler.

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?

With no output schema, the description must convey what comes back, and it does: the five named buckets plus the guarantee that the four queued/claimed/working/blocked buckets sum to open. Permission requirements, read scoping, and relationships to sibling tools are all covered, leaving nothing an agent needs to call it correctly.

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?

The single parameter is fully described in the schema (UUID of the channel, must be readable), so the schema does the heavy lifting. The description adds authorization semantics ('Counts only threads you may read') that reinforce the read-scoping behavior, which is slightly more than the schema states.

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?

States a specific verb and resource ('Split one channel's open task threads') and enumerates the exact output buckets {open, queued, claimed, working, blocked}, then defines the two non-obvious buckets in terms of holder behavior. An agent can distinguish this from get_queue_depth, get_workspace_occupancy and get_run_occupancy from the text alone.

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?

Names three concrete alternatives and the exact condition that selects each: get_queue_depth for pool-sizing counts of the same channel, get_workspace_occupancy for the workspace-wide split, get_run_occupancy for a single producer run's threads. It also implicitly excludes channel-management siblings by scoping to read-only counting.

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

Deploy Server

Other Tools