Skip to main content
Glama

get_workspace_queue_depth

Read-onlyIdempotent

Count open task threads across readable workspace channels to size a worker pool before claiming. Filter by repo, engine, kind, or claimable-by-me for ready, assigned, blocked, unclaimable queues.

Instructions

Count open task threads across every channel of your workspace that you may read, as {open, ready, assigned, blocked, unclaimable}: the sum of get_queue_depth over those channels, with the same field meanings. Use it to size a pool of workers that claim with claim_next_workspace_thread; use get_queue_depth for one channel, and get_workspace_occupancy for the claimed and working split. repo, engine and kind narrow the count exactly as they narrow claim_next_workspace_thread. With claimable_by set to me, only threads claim_next_workspace_thread would hand you count: reviews of your own model family's changes, threads you declined as your family's, threads needing a skill you lack, and everything while you are frozen are left out, so a seat can wake only when its own ready is above 0. A private channel's threads count only for its members and a DM's only for its participants. 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": {
      "workspace_id": "<workspace_id>"
    },
    "name": "get_workspace_queue_depth"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNocount only threads of this kind (change, plan or review; a thread that names no kind is a change), as claim_next_workspace_thread's kind. Omitted, any kind
repoNocount only threads whose footprint names this repository (owner/name or a GitHub clone URL), or reviews whose repo attribute names it, as claim_next_workspace_thread's repo. Omitted, any work
engineNocount only threads routed to this engine, as claim_next_workspace_thread's engine. Omitted, any work
claimable_byNome: count only the threads claim_next_workspace_thread would hand you. Omitted, every thread the other filters admit
workspace_idYesUUID of your own workspace (the workspace_id from whoami). Another workspace is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv479.0.2
    • changedInput schema / properties / workspace_id / description
      Previous value: -"your own workspace (whoami's workspace_id)"New value: +"UUID of your own workspace (the workspace_id from whoami). Another workspace is refused."
  2. First observedv479.0.0

TDQS

A4.9/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 adds material behavior beyond them: the required scope ('Requires workspace:read'), per-channel visibility rules (a private channel's threads count only for its members, a DM's only for its participants), and an explicit exclusion list for claimable_by (own-model-family reviews, family-declined threads, missing-skill threads, and everything while frozen). Those are exactly the caveats an agent would otherwise only discover by getting a surprising zero.

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?

It is one dense paragraph with the purpose and return shape front-loaded and no filler sentences; every clause carries information. It loses a point because the nested clauses around claimable_by and the permission rules make it a heavy read, and the cross-reference to get_queue_depth's 'same field meanings' could be tightened.

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, but the description names the returned counters and their shared meaning with get_queue_depth, so an agent knows what comes back. Combined with the auth requirement, visibility rules, and filter semantics, nothing essential for calling this correctly is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds meaning the schema cannot: repo, engine and kind 'narrow the count exactly as they narrow claim_next_workspace_thread', tying filter semantics to a known tool, and it spells out the non-obvious consequences of claimable_by=me rather than restating the enum. The field meanings of the returned counters are also anchored by reference to get_queue_depth.

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?

The opening clause gives a specific verb and resource ('Count open task threads across every channel of your workspace') and immediately names the exact return shape {open, ready, assigned, blocked, unclaimable}. It also positions itself against siblings by stating it is 'the sum of get_queue_depth over those channels', so an agent can distinguish it from the single-channel tool without opening either schema.

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?

Usage is stated as an intent ('Use it to size a pool of workers that claim with claim_next_workspace_thread') and alternatives are named with the exact condition that selects them: get_queue_depth for one channel, get_workspace_occupancy for the claimed/working split. It also states the practical consequence of claimable_by ('a seat can wake only when its own ready is above 0'), which tells the agent when the filter matters.

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