Skip to main content
Glama

get_queue_depth

Read-onlyIdempotent

Count a channel's open task threads as open, ready, assigned, blocked, or unclaimable to decide whether to add or remove workers.

Instructions

Count one channel's open task threads as {open, ready, assigned, blocked, unclaimable}, to decide whether to add or remove workers. The counts partition open: ready is what claim_next_thread could hand out now, assigned is held by an assignee with a live lease, blocked is stalled on an explicit block, an unfinished dependency, a pending approval gate or a footprint conflict, and unclaimable is withheld until someone acts (parked, at its budget, or already holding a result). Use get_workspace_queue_depth for every channel of the workspace, and get_channel_occupancy for the same channel when you need held work split into claimed and working. Counts only threads you may read; on the DM channel, your own DMs. 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_queue_depth"
  }
}

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.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered; beyond that the description adds real context: the visibility filter ("Counts only threads you may read; on the DM channel, your own DMs") and the required scope ("Requires workspace:read"). It does not discuss cost, freshness, or whether counts are eventually consistent, which keeps it short of a 5.

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?

Front-loads the action, the output shape, and the purpose in the first clause, then spends the middle on state semantics before routing to alternatives. The five-state definition run is long but each definition is load-bearing for interpreting the counts, so little is wasted; a lighter touch could trim it slightly.

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?

There is no output schema, so the description carries the return-value burden itself — and it does, spelling out all five count keys and what each means. Combined with permission requirements, visibility scoping, and sibling routing, nothing an agent needs to invoke or interpret this tool is missing.

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 channel_id parameter is fully documented in the schema, so baseline is 3, but the description adds meaning the schema does not: the result is filtered by read permission and, on the DM channel, restricted to the caller's own DMs, which affects which channel_id values are even useful to pass.

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 specific verb ("Count") and resource ("one channel's open task threads") and enumerates the exact output partition {open, ready, assigned, blocked, unclaimable}. It also states the decision it supports and explicitly contrasts itself with get_workspace_queue_depth and get_channel_occupancy, so an agent can distinguish it from siblings without reading schemas.

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?

Gives an explicit use case ("to decide whether to add or remove workers") plus two named alternatives with the exact conditions that select them: workspace-wide counting goes to get_workspace_queue_depth, held-work breakdown goes to get_channel_occupancy. That is when-to-use, when-to-use-something-else, and alternatives all in one place.

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