Skip to main content
Glama

Shared resource

resource

Claim, release, or list shared exclusive items so only one session or helper starts a dev window, port, or similar task at a time; claims are refused with holder details when in use.

Instructions

A named shared resource that only one session or helper can use at a time (a dev window that allows a single instance, plasmashell, a port). claim it before you or a helper start something that needs it: refused, saying who holds it, since when and why, when someone else has it; then do not start it, do other work and try again later (nothing waits for you). Claiming your own again refreshes its time. It frees itself after minutes (30 unless given, at most 240) from the last claim, when its Session ends, or when you release it. A helper usually cannot call Progressor: claim on its behalf with label such as 'helper: media run'. release it as soon as the work that needed it ends (a helper's too), with the same label; another holder's is refused unless force, only when the Developer says the holder is gone. list says who holds what (get_status shows the same).

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": "resource"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskNoTo claim: the Task ID it is for, such as 't3'.
forceNoTo release: even though someone else holds it. Only when the Developer asks.
labelNoWho it is held for when that is not this Session itself, such as 'helper: media run'. Claim and release a helper's lock with the same label.
actionYesclaim, release or list.
reasonNoTo claim: why you need it, in a few words, such as 'running the UI test'. Shown to whoever is refused.
minutesNoTo claim: how long to keep it before it frees itself, from now. 30 if omitted; claim again to extend.
resourceNoThe shared thing's name, such as 'dev-window' or 'plasmashell'. Case and spaces do not matter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: refusal returns who holds it, since when and why; nothing queues or waits; locks self-expire after `minutes` (default 30, cap 240) from the last claim, at Session end, or on release; re-claiming refreshes the timer; force-release is gated on the Developer's instruction. These are exactly the behavioral traits an agent needs to avoid deadlocks and misuse.

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?

Nearly every clause carries information (contention handling, expiry, helper claiming, force gating), so length is justified. However, the single dense paragraph of semicolon-chained fragments ('refused, saying who holds it, since when and why, when someone else has it; then do not start it...') is harder to parse than a short structured list would be.

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 7-parameter coordination tool with no annotations and no output schema, the description covers lifecycle, contention, expiry, helper delegation and force conditions. It only lightly specifies what 'list' returns ('who holds what') and gives no field-level return detail, which matters somewhat given the absence of an output schema.

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 coverage is 100%, so the schema already documents label, reason, minutes, force and resource. The description's parameter-relevant statements (helper labels like 'helper: media run', minutes default/extension, force gating, reason shown to the refused party) largely restate the schema rather than adding syntax or format meaning. Baseline 3 is appropriate.

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 establishes a specific concept: a named mutual-exclusion lock with three operations (claim/release/list), which is clearly distinct from ordinary task tools. It even separates 'list' from the sibling get_status ('list says who holds what (get_status shows the same)'). The only weakness is that the opening sentence defines the object rather than front-loading the verbs, and the telegraphic clause style slightly slows recognition.

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?

States explicitly when to claim ('before you or a helper start something that needs it'), what to do when refused ('do not start it, do other work and try again later'), when to release ('as soon as the work that needed it ends ... a helper's too'), and names the alternative for read-only inspection (get_status). Exclusions for force are also given ('only when the Developer says the holder is gone').

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