Skip to main content
Glama

AANet

aanet_acquire_lock

Claim exclusive ownership of a named unit of work so no other sub-agent starts the same thing — call this before starting work, not after. Returns {lease_expires_at} on success, or a 409 if another sub-agent already holds an unexpired lease on the same name (that conflict is free — you are not charged for losing a race).

You do not hold the lock forever: once lease_seconds elapses, anyone can
acquire it out from under you, even if you're still working. Call
aanet_renew_lock periodically while still working, and
aanet_release_lock the moment you're done so others don't wait out the
full lease unnecessarily.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesLock name identifying the unit of work, e.g. "process-batch-3".
api_keyYesBearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403.
workspace_idYesThe workspace_id from aanet_create_workspace or aanet_create_trial_workspace.
lease_secondsYesHow long you hold the lock before it becomes reclaimable by anyone else, 1-3600 seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / api_key / description
      Added value: +"Bearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403."
    • addedInput schema / properties / lease_seconds / description
      Added value: +"How long you hold the lock before it becomes reclaimable by anyone else, 1-3600 seconds."
    • addedInput schema / properties / lease_seconds / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / lease_seconds / maximum
      Added value: +3600
    • addedInput schema / properties / name / description
      Added value: +"Lock name identifying the unit of work, e.g. \"process-batch-3\"."
    • addedInput schema / properties / workspace_id / description
      Added value: +"The workspace_id from aanet_create_workspace or aanet_create_trial_workspace."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

There are no annotations, so the description carries the full behavioral burden. It discloses the success return shape, the 409 conflict case, that a lost race is free, that leases expire after lease_seconds, that the other agent can quote acquire it out from under you quote, and that locking is not permanent. This is comprehensive behavioral disclosure for a locking tool.

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?

Every sentence has a distinct purpose: it states the tool's job, gives a critical timing rule, explains the lease expiry consequence, and then directs renewal and release behavior. It is information-dense but not bloated, and the most important instruction is front-loaded.

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?

Given the tool's complexity, the absence of annotations, and the absence of an output schema, the description is strikingly complete. It tells the agent what happens on success, what happens on conflict, who can take the lock, when the lock can be lost, and what to call next. No critical piece of operational knowledge is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the description does not need to re-document every parameter, but it adds meaningful semantics: name is a unit of work and lease_seconds controls the duration before the lock becomes reclaimable. This is value the schema does not express in terms of the locking protocol, though it does not add much beyond that.

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 description begins with a specific verb and resource: 'Claim exclusive ownership of a named unit of work'. It also states the exact purpose — preventing another sub-agent from starting the same work — and the sibling names make the distinction from aanet_renew_lock and aanet_release_lock clear even without explicitly naming them. This removes all ambiguity about the tool's role.

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?

The description explicitly says 'call this before starting work, not after', and then provides a complete usage protocol: renew periodically with aanet_renew_lock and release with aanet_release_lock when done. It tells the agent not only when to use this tool but when to use related siblings and why, which is exactly the guidance needed.

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