Skip to main content
Glama

session_lease

Acquire or renew an exclusive advisory lease on a session, returning a token to present on subsequent calls so other clients receive a busy error instead of overwriting shared state.

Instructions

Acquire/renew an exclusive advisory lease on a running session (0.7.0). Returns a token; present it as the lease arg on subsequent calls so other clients get a 'busy' error instead of clobbering the shared page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoSession name (default: current session).
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
ownerNoHolder label shown in the busy message.
stealNoTake over a lease held by someone else.
ttl_sNoLease seconds (default 60, max 3600).
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains that the tool returns a token, that this token must be presented as the 'lease' arg on subsequent calls, and that it causes other clients to receive a 'busy' error. It also describes the lease as 'advisory', giving insight into its non-enforced nature. This adds valuable context beyond the schema.

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?

The description is two concise sentences that front-load the core action and then provide the essential behavioral context. No word is wasted, and the key use case is immediately clear.

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?

Given the tool's complexity (6 parameters, no output schema, no annotations) and the high schema coverage, the description is sufficiently complete for an agent to call it correctly. It covers the primary behavior (token return, usage, and effect on others) and leaves parameter details to the schema. It could mention edge cases like behavior on renewal or failure, but these are not essential.

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 baseline is 3. The description adds meaning to the 'lease' parameter by explaining its role as the returned token to present on subsequent calls, which helps the agent understand its semantics better. It does not elaborate on other parameters, but they are already well-described in the schema.

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 states a specific action ('Acquire/renew an exclusive advisory lease on a running session') with a clear resource and purpose. It distinguishes itself from siblings like session_lease_info and session_release by focusing on acquiring/renewing the lease rather than querying or releasing it.

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?

The description explains when to use the tool (to obtain an exclusive lease token so other clients get a 'busy' error and cannot clobber the shared page). It gives clear context for use, though it does not explicitly mention alternatives or when not to use it, leaving some inference to the agent.

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