Skip to main content
Glama

drive_lease_acquire

Back up a Drive file and acquire a write lease, authorizing repeated writes to that file until expiry with one consent.

Instructions

Back up a Drive file and acquire a write lease. Mirrors omni-dev drive lease acquire. Example: file_id:"1a2B3c4D", expiry_minutes:30. Prompts for device-owner authentication (Touch ID or account password; operator biometrics_only requires Touch ID). Native Docs/Sheets need the selected account's lease_backup_folder_id. Operator-only headless waiver applies; callers cannot set it. One consent covers repeated writes to that file until expiry. already-leased successfully returns the existing token, even if stale: release it via CLI or wait for expiry before renewing. The OS prompt can wait up to 120 seconds. Timeout/cancellation is not rollback: wait for the original call to finish, then explicitly repeat acquisition to recover an undelivered live token without another prompt/backup. Do not automatically race acquisitions. Output is tagged YAML; denied/unavailable/refused/failed set is_error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoSelects a named Drive account instead of the ambient `--account`/`OMNI_DEV_DRIVE_ACCOUNT` resolution — e.g. `work`. Omit to use the resolved default account (or the legacy single-account credentials, if no named accounts are configured). Call `drive_account_list` to discover configured names.
file_idYesDrive file id to back up and lease, e.g. 1a2B3c4D. Required.
expiry_minutesNoLease lifetime in minutes (1–1440). Defaults to operator env/settings, then 30; writes never extend it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.45.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly: it discloses the device-owner auth prompt (Touch ID or password, biometrics_only requiring Touch ID), the 120s OS prompt window, that one consent covers repeated writes until expiry, that already-leased returns a stale token, and that timeout is not rollback and must be recovered by explicitly repeating acquisition without racing.

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?

The prose is dense but front-loads the core action and example before edge cases, and every sentence addresses a distinct operational concern (auth, consent scope, stale tokens, recovery, racing). It is long, but the length is largely justified by the tool's complexity; a few clauses could be tightened.

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?

For a complex, prompt-driven, stateful operation with no output schema, the description still states the return shape ('tagged YAML; denied/unavailable/refused/failed set is_error') and covers recovery and consent lifecycle. Nothing an agent needs to invoke it correctly appears missing.

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 100%, so the schema already documents account, file_id, and expiry_minutes (including the 1–1440 range and default chain). The description adds a small worked example (file_id:"1a2B3c4D", expiry_minutes:30) but no syntax or semantics beyond what the schema provides, so the baseline of 3 is appropriate.

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 opens with a specific verb+resource: 'Back up a Drive file and acquire a write lease,' which is exactly what the name claims and distinguishes it from Drive read/write siblings like drive_docs_replace and drive_file_read. It also anchors the command to its CLI mirror (`omni-dev drive lease acquire`), leaving no ambiguity about the operation.

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?

It gives strong contextual guidance: the auth prompt prerequisites, the operator-only headless waiver (callers cannot set it), the repeated-write consent scope, and the already-leased / timeout / race behaviors. What it lacks is explicit routing to alternative tools (e.g., when to prefer a plain write over acquiring a lease), so it stops short of full when/when-not/alternatives.

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

Deploy Server

Other Tools