Skip to main content
Glama

claim_path

Claim exclusive access to a file or folder path on the session bus. Fails immediately if another session holds the lock, allowing coordination. Locks expire after a configurable time.

Instructions

Cooperatively lock a path on the session bus before editing it. Fail-fast: if another live session holds the lock the claim is refused and the holder is returned; coordinate or pick another territory instead of retrying in a loop. Locks expire after ttl_seconds (default 900, max 3600) and die with their session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRepo-relative or absolute path (file or folder) to lock.
session_idNoSession id acquiring the lock. Defaults to the current session.
ttl_secondsNoLock lifetime in seconds (1-3600, default 900).
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses cooperative locking, fail-fast refusal, lock expiration (ttl), and session-based death. However, it does not describe what the tool returns on success (e.g., confirmation or lock token), which is a gap for an agent using the 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?

The description is three sentences with no wasted words. The first sentence front-loads the core purpose. Every sentence adds necessary detail about behavior and constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description adequately explains locking behavior but omits success return value and does not mention the need to later release the lock (via release_path). This leaves the agent with some ambiguity about the full workflow.

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?

The input schema covers all three parameters with descriptions (100% coverage). The description does not add any parameter-specific meaning beyond the schema: it repeats the default ttl_seconds but does not provide additional guidance on path or session_id. 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 directly states: 'Cooperatively lock a path on the session bus before editing it.' The verb 'lock' and resource 'path' are specific. This distinguishes it from sibling tools like release_path (unlock) and working_memory_* (memory operations).

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 provides clear usage context: use before editing, and fail-fast if lock is held. It explicitly advises against retrying in a loop, suggesting to 'coordinate or pick another territory instead.' However, it does not explicitly mention the counterpart release_path for releasing the lock, though the sibling exists.

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/Fmarzochi/EGC'

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