Skip to main content
Glama

Check a file right before editing it

check_file_before_edit

Verify a file's freshness before editing: checks for recent teammate commits and anchor-verified notes, catching mid-session drift that could cause conflicts.

Instructions

Fast, single-file freshness check - call this immediately before editing any file that's part of a shared interface or that you haven't touched yet this session, ESPECIALLY in a long-running session. Returns anchor-verified notes on the file plus real commits from anyone else touching it in the last 15 minutes. This is cheaper than get_handoff_brief and catches drift a session-start snapshot misses (a teammate can commit to this exact file while you're mid-session).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYes

Schema Changelog

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

  1. First observedv1.0.2

TDQS

A4.3/5.0
Behavior4/5

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

There are no annotations, so the description carries the full behavioral burden. It discloses useful traits: the check is fast, single-file, returns anchor-verified notes, includes real commits from the last 15 minutes, and catches mid-session drift. It does not explicitly state side-effect behavior (e.g., read-only) or failure behavior, but 'check' strongly implies a non-mutating operation.

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 compact, front-loaded with the key action and timing, and every sentence earns its place: usage conditions, return contents, and a comparative cost signal. No redundant or filler phrasing is present.

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?

For a one-parameter tool with no output schema and no annotations, the description covers the main invocation context, what is returned, and how it relates to alternatives. It does not specify the exact response structure or how to interpret 'anchor-verified' results, but it provides enough for most agents to call and use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain the filePath parameter's required format, whether it must be absolute or relative, or any constraints. Phrases like 'single-file' and 'this exact file' merely reinforce the parameter name rather than adding semantic detail an agent would need to invoke it correctly.

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 ('freshness check') and resource ('single-file'), and clearly positions the tool as the thing to call immediately before editing a file. It also differentiates from alternatives by naming get_handoff_brief as more expensive and by contrasting against a session-start snapshot.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit conditions for when to use it: 'immediately before editing any file that's part of a shared interface or that you haven't touched yet this session, ESPECIALLY in a long-running session.' It also provides an alternative comparison, noting it is cheaper than get_handoff_brief and catches drift that a session-start snapshot misses.

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/imortis/teamhub-mcp'

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