Skip to main content
Glama

Semaphore

semaphore
Destructive

Counting semaphore: at most limit concurrent holders, each with an owner_token and fence. Same actions as lease. Use it to cap how many agents work in parallel.

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": {
      "action": "<action>"
    },
    "name": "semaphore"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
limitNo
actionYes
holderNo
owner_tokenNo
ttl_secondsNo
hold_secondsNo
wait_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the risky profile is signposted. The description adds a genuine mental model (concurrency cap, owner_token, fence), but leaves key behavioral traits unexplained: whether `acquire` blocks for `wait_seconds`, how `ttl_seconds`/`hold_seconds` govern expiry and auto-release, and what `delete` actually destroys (holders, tokens, history). For a destructive 8-parameter tool that is a meaningful gap, though it does not contradict the annotations.

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?

Two tight sentences with the defining constraint front-loaded ahead of the usage hint and the sibling pointer. No wasted wording, though the 'fence' reference is an unexplained term that costs clarity without adding usable information.

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

Completeness3/5

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

Given eight parameters, a seven-value action enum, destructive annotations, and no output schema, the description is too thin to let an agent invoke it correctly without reverse-engineering the schema. The conceptual core is present, but the lifecycle semantics (ttl, hold, wait, release/delete) are entirely absent.

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

Parameters2/5

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

Schema description coverage is 0% across eight parameters, so the description carries the full explanatory burden and largely fails to. It mentions `limit` and `owner_token`, and gestures at `holder` via 'holders', but says nothing about `ttl_seconds`, `hold_seconds`, `wait_seconds`, `id`, or what each `action` value requires — and it references a 'fence' that is not even a parameter.

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 names a specific resource (a counting semaphore) and its defining constraint: at most `limit` concurrent holders, each tagged with an owner_token and fence. It also points at the sibling `lease` as the behavioral equivalent, which helps an agent separate the two. It stops short of enumerating the actual operations, deferring that to the sibling reference.

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?

There is one clear positive use case: 'Use it to cap how many agents work in parallel.' However, there is no guidance on when-not to use it (e.g. mutual exclusion vs. counting, or when `lease` is the better pick), and no mapping of the seven enum actions (create/read/acquire/renew/release/touch/delete) to situations. 'Same actions as lease' offloads the core usage guidance to another tool's documentation.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources