Skip to main content
Glama

count_workers

Count heartbeating workers in a Temporal namespace, optionally filtered by a worker visibility query, to assess active worker capacity.

Instructions

Count heartbeating workers in the namespace, optionally filtered by a worker query. Needs worker heartbeating like list_workers; otherwise use describe_task_queue.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "count_workers"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoWorker visibility query, e.g. TaskQueue = "my-queue"
namespaceNoTemporal namespace for this operation; omit to use the server default
include_system_workersNoAlso count the server's internal workers (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the burden, and it does disclose the key gating behavior: the tool requires worker heartbeating and silently degrades to a different tool if unavailable. It does not discuss permissions or what the returned count represents, but the prerequisite disclosure is the most decision-relevant trait.

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

Conciseness5/5

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

Two compact sentences with the core action first and the fallback routing second. Nothing redundant.

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

Completeness4/5

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

For a simple read-only count with three fully documented optional parameters and an obvious scalar return, the description plus schema is nearly sufficient. The only shortfall is no mention of what the count is scoped to when include_system_workers is set, though the schema covers that flag.

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

Parameters3/5

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

Schema description coverage is 100%, so the query, namespace, and include_system_workers parameters are already fully documented by the schema. The description only restates the optional query filter, adding no syntax or usage detail beyond structured data.

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 (count) and resource (heartbeating workers) with scope (namespace) and an optional filter. It also names the sibling it is not (list_workers) and the fallback (describe_task_queue), so the agent can place it precisely.

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

Usage Guidelines4/5

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

Gives a clear routing rule: if worker heartbeating is available use this, otherwise use describe_task_queue. It does not explicitly state when to count versus list_workers, but the verb distinction makes that mostly self-evident.

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