Skip to main content
Glama

edit_collision_guard

Records a file snapshot after reading, then verifies before editing to detect external modifications, preventing silent overwrites and edit conflicts.

Instructions

Two-step guard: record_read (snapshot) after reading, check before editing. Detects external edits. Pairs edit_transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesFile path relative to workspace_dir
actionYesrecord_read: snapshot after reading; check: verify before editing
session_idNoOptional session ID for multi-agent isolation (default: "default")
workspace_dirYesREQUIRED: project root (abs). reindex first if new.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. It discloses the two-step workflow and the fact that external edits are detected, but does not explain what happens on detection, where snapshots are stored, or whether the guard has side effects. The integration hint with edit_transaction is vague.

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?

Two short sentences convey the core workflow and purpose without wasted words. The structure is front-loaded with the tool's purpose and steps, making it easy to scan.

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?

Despite having no output schema or annotations, the description explains the core workflow but omits return values, failure behavior, and session handling implications. Given the tool's relatively low complexity, this is adequate but leaves gaps that an agent would need to infer or discover.

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 baseline is 3. The description's 'record_read (snapshot) after reading, check before editing' essentially restates the exact semantics already in the action parameter's enum descriptions, adding no new information for parameter use.

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?

Clearly defines a two-step guard mechanism with specific actions (record_read and check) and its purpose of detecting external edits before modifying a file. Distinguishes itself from siblings by explicitly pairing with edit_transaction.

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?

Provides explicit timing guidance: record_read after reading, check before editing. Mentions pairing with edit_transaction, giving contextual fit. Does not mention alternatives or exclusions, but the usage pattern is clear.

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

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/wulun811/LiuHe'

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