Skip to main content
Glama

check_edit_safe

Read-onlyIdempotent

Check if a file or symbol is safe to edit before making changes. Get a verdict with ranked blockers, recommended action, and what to preserve.

Instructions

Edit-safety preflight: before you MODIFY a symbol or file, get ONE verdict for "is this safe to edit and what must I preserve". Fuses signature impact (cross-file importers depending on the current contract), cyclomatic complexity (regression-prone bodies), and test-coverage presence into a single verdict tier (safe_to_edit / untested / complexity_risk / signature_impact) with ranked blockers, a one-line recommended action, and a confidence score. Complements assess_change_risk (continuous risk score) — this names the dominant blocker and what to preserve. Read-only. Returns JSON: { verdict, recommended_action, blockers: [{ signal, severity, detail }], confidence, signals }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesFile path to check before editing
symbol_idYesSymbol ID to check before editing
Behavior5/5

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

Beyond annotations, describes behavior: fuses signature impact, cyclomatic complexity, test coverage into a verdict; returns blockers, recommended action, confidence, signals; states read-only. No contradiction.

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?

Front-loaded with purpose but slightly verbose; still well-structured and each sentence adds value, just not maximally concise.

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?

No output schema, but description fully specifies return JSON structure including verdict, recommended_action, blockers with details, confidence, signals; complete for agent usage.

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 coverage 100% and description adds no extra semantics beyond parameter names and types; baseline 3.

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 states edit-safety preflight before modifying a symbol or file, distinguishes from assess_change_risk by naming dominant blocker and preservation.

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?

Explicitly says 'before you MODIFY' and names complementary tool assess_change_risk for continuous risk, providing clear when-to-use and alternatives.

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/nikolai-vysotskyi/trace-mcp'

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