Skip to main content
Glama
Majrooo

majrooo-mcp-devkit

by Majrooo

verify_refactor_safety

Read-onlyIdempotent

Compares old and new code to catch accidental deletions before compilation. Checks function count, signatures, exports, imports, and comment ratio for safe refactoring.

Instructions

Semantic diff between old and new code. Catches accidental deletions before compilation. Checks: function count, signatures, export count, imports, comment ratio. Intentionally conservative — renames appear as errors requiring explicit confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesNew code text
beforeYesOriginal code text
languageNoLanguage (auto-detected from content)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely non-obvious behavior beyond that: it is deliberately conservative, and renames will surface as errors requiring explicit confirmation. That false-positive profile materially affects how an agent interprets results.

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?

Three short sentences, each earning its place: purpose, motivation, checks performed, and the conservative-bias caveat. Front-loaded with the core definition and free of filler.

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?

With no output schema, the description usefully enumerates the checks it reports (function count, signatures, exports, imports, comment ratio) and the rename-confirmation behavior. It stops short of describing the result shape or whether mismatches block anything, but an agent has enough to call it correctly.

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 before/after/language are already documented, including language auto-detection and the enum. The description adds no syntax or format detail beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource: a semantic diff between old and new code, plus the concrete checks it performs. This is clearly distinguishable from every sibling tool, none of which do source-diff analysis.

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?

"Catches accidental deletions before compilation" gives a clear usage context (pre-build verification after a refactor). It does not name an alternative tool or state when not to use it, but for this toolkit there is no obvious competing option.

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