Skip to main content
Glama
askadvaith

MCP State Sidecar Server

by askadvaith

lease_acquire

Acquire an exclusive, TTL-based lease on a resource to avoid split-brain. Only one agent holds the lease at a time; leases expire automatically.

Instructions

Try to acquire an exclusive, TTL-based lease on a named resource.

Use this to prevent split-brain when multiple agents could simultaneously work on the same resource. Only one holder can hold the lease at a time.

If the current holder crashes, the lease expires automatically after ttl_seconds and another agent can acquire it.

Returns acquired=True on success with the expiry timestamp. Returns acquired=False with the current holder's ID on failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holder_idYes
resource_idYes
ttl_secondsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
holderNo
reasonNo
acquiredYes
expires_atNo
resource_idYes
Behavior5/5

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

No annotations provided, but the description fully discloses behavior: exclusive lease, TTL-based, automatic expiry on crash, and return values (acquired=True with expiry timestamp, acquired=False with holder ID). This provides thorough transparency beyond structured data.

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?

Three concise sentences, front-loaded with the action, and structured with clear sections. No wasted words; every sentence adds value.

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?

Covers all necessary aspects: purpose, usage scenario, behavior, and outcomes. With an output schema present, return value explanation is sufficient. Complete for a tool with 3 parameters.

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 0%, so the description must add meaning. It implies the roles of resource_id, holder_id, and ttl_seconds through context ('named resource', 'holder', 'TTL-based'), but does not explicitly list or describe each parameter. Adequate but not explicit.

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?

Description clearly states the action: 'Try to acquire an exclusive, TTL-based lease on a named resource.' It uses a specific verb and resource, and distinguishes itself from sibling tools like lease_release and lease_renew.

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?

Explicitly states when to use: 'Use this to prevent split-brain when multiple agents could simultaneously work on the same resource.' While it doesn't explicitly list when not to use, the context and sibling tools imply it's for acquiring, not releasing or renewing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/askadvaith/MCP-State-Sidecar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server