Skip to main content
Glama
Host Process & Sub-Agent Governor

Host Process & Sub-Agent Governor

by jasonroject

governor_acquire_slot

Acquires a concurrency slot before launching a sub-agent, enforcing a maximum of three active sub-agents per AI model across instances. Use it to prevent model overload and control queued access.

Instructions

Acquire a sub-agent concurrency slot. Strictly enforces a limit of no more than 3 active sub-agents per AI model (cross-instance safe).

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": {
      "modelId": "<modelId>",
      "subAgentName": "<subAgentName>"
    },
    "name": "governor_acquire_slot"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelIdYesIdentifier of the AI model being used (e.g. "gemini-3.8-flash", "gemini-2.5-pro", "o3", "claude-3-7-sonnet").
priorityNoQueue priority (low, normal, high, critical). Defaults to normal.
timeoutMsNoMax milliseconds to wait in priority queue if capacity is full (default: 0 = immediate reject).
subAgentNameYesRole or title of the sub-agent (e.g. "Codebase Researcher", "Unit Tester").
idempotencyKeyNoOptional unique key to prevent duplicate lease grants on client retries.
leaseTtlSecondsNoSafety TTL for this lease in seconds before automatic release (default: 600s).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose the key behavioral trait: a hard cap of 3 concurrent sub-agents per model enforced cross-instance. It does not say whether over-limit calls throw, block, or return a rejection, nor that acquisition creates a lease that must be released before another sub-agent can proceed.

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 short sentences, front-loaded with the action and the constraint, with zero redundant wording. Nothing here could be cut without losing a distinct fact.

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

Completeness2/5

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

This is a stateful, six-parameter leasing tool with no annotations and no output schema, yet the description never covers what the call returns (a slot/lease handle), the obligation to release via governor_release_slot, or the failure mode when capacity is full. For a tool whose misuse causes deadlocks or starvation, that is a significant omission.

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 all six parameters (including priority enum, timeoutMs, idempotencyKey, leaseTtlSeconds) are already documented in the schema with examples and defaults. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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

Purpose4/5

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

The description uses a specific verb+resource ("Acquire a sub-agent concurrency slot") and adds the concrete governing constraint (max 3 active sub-agents per model, cross-instance safe). It does not explicitly name the counterpart sibling governor_release_slot, so an agent must infer that pairing from the name alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: an agent can infer this must be called before spawning a sub-agent, and the schema's timeoutMs/priority fields hint at queue behavior. There is no explicit when-to-use framing, no mention of releasing the slot afterward, and no statement of what to do when the limit is reached.

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