Skip to main content
Glama
AiDimag

AI Dimag

Official

memory_check_change

Pre-edit safety check: submit a diff or change description to surface matching guardrails, invariants, conventions, and failed approaches. Returns proceed, ask_first, or stop before modifying code.

Instructions

Pre-edit safety check: given a diff or a short description of a change you're about to make, return any FAILED_APPROACH, GUARDRAIL, INVARIANT, or CONVENTION memories that match. Call this BEFORE editing code when the task touches an area with known historical failures or explicit rules. Returns a decision: proceed, ask_first, or stop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
diffNoUnified diff of the proposed change (e.g. git diff --no-index or a hand-written patch). If omitted, the check is based on paths + task only.
taskNoShort plain-text description of what you're about to do (used for keyword matching when no diff is given)
pathsNoRepo-relative paths the change touches
agent_idNoYour agent identifier, e.g. 'claude-code'
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It clearly establishes this is a pre-edit check and states what it returns (a decision and matching memories), implying a read-only, non-destructive operation. It doesn't explicitly state side-effect-free, but 'check' and 'return a decision' strongly imply no mutation. Slightly better if it stated 'does not modify anything'.

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 purpose-built sentences: the first states what the tool does and what it returns (decision types), the second states the exact call condition. Front-loaded with 'Pre-edit safety check'. No wasted words.

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?

4 params fully covered in the schema registered at 100% coverage)Skip. The description adds the decision semantics (proceed/ask_first/stop) and the before-editing usage contextcars. A safety-check tool with no output schema benefits from the explicit return value list, which it provides. Slightly light on what 'matching' means (keyword/path matching), but the schema's param descriptions handle that.

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?

Every parameter (diff, task, paths, agent_id) is described in the schema with 100% coverage, so the baseline is 3. The description reinforces purpose (diff vs task/paths matching) but doesn't add semantics beyond the schema. Acceptable but not additive.

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 names the exact verb ('check'), resource ('FAILED_APPROACH, GUARDRAIL, INVARIANT, or CONVENTION memories'), and the decision output (proceed, ask_first, stop). It also distinguishes the matching scope (diff or task/paths), so an agent knows exactly what this tool does and what it returns.

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 explicitly tells the agent WHEN to call: 'BEFORE editing code' and 'when the task touches an area with known historical failures or explicit rules.' It also explains the diff-or-description fallback semantics. This is prescriptive and the tool names its output decision clearly.

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/AiDimag/aidimag'

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