Skip to main content
Glama
LogicStamp

logicstamp-mcp

Official
by LogicStamp

logicstamp_compare_snapshot

Compares current code snapshot against a baseline to detect added, removed, or changed components and their contracts. Provides a structured diff to verify changes after editing, like a snapshot test for code structure.

Instructions

Compares current snapshot with baseline to detect changes. Reads context_main.json and folder context.json files. Detects: ADDED/REMOVED/CHANGED/UNCHANGED folders/components (props, hooks, imports, semantic hash changes). Returns structured diff with token deltas. Use after editing files to verify changes (like Jest snapshots - detects contract drift, not just file changes). Default (forceRegenerate=false): Reads from disk (fast, assumes fresh). Set forceRegenerate=true to regenerate before comparing. Style: Set includeStyle=true (with forceRegenerate=true) to include style metadata. Depth: Set depth when forceRegenerate=true (default=2 nested, 1=direct only). Baseline: "disk" (current snapshot, default), "snapshot" (stored), or "git:" (future). Error: If context_main.json missing and forceRegenerate=false, fails - run refresh_snapshot first or use forceRegenerate=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNoAnalysis profile (only used if forceRegenerate: true). llm-chat=balanced (default), llm-safe=conservative, ci-strict=contracts onlyllm-chat
modeNoCode inclusion mode (only used if forceRegenerate: true). none=contracts only, header=contracts+JSDoc (default), full=complete sourceheader
includeStyleNoInclude style metadata in comparison (only takes effect when forceRegenerate: true). Extracts Tailwind classes, SCSS, layout patterns, colors, spacing, animations. If forceRegenerate is false, compares whatever is on disk (may not have style metadata).
depthNoDependency traversal depth. Default: 2 (includes nested components, e.g., App → Hero → Button). Set to 1 for direct dependencies only (e.g., App → Hero). Only used when forceRegenerate: true.
forceRegenerateNoForce regeneration before comparing. When true, runs `stamp context` (with --include-style if includeStyle is true) to generate fresh context files. When false, reads existing context_main.json from disk (fast, assumes context is fresh).
projectPathNoAbsolute path to project root (default: current working directory)
baselineNoComparison baseline: "disk" (current snapshot, default), "snapshot" (stored snapshot), or "git:<ref>" (future: git baseline)disk
cleanCacheNoManually force cleanup of .logicstamp cache folder. Default: false (auto-detects corruption/mismatch). Set to true to force cache reset. Use only when experiencing cache-related issues.
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: it reads context_main.json and folder context.json, returns a structured diff with token deltas, and details parameter effects (e.g., forceRegenerate triggering regeneration, baseline options). It also describes error conditions when files are missing.

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 packed with information but remains concise and well-structured. It begins with a clear one-line purpose, then logically flows into parameter details and use cases, avoiding unnecessary elaboration.

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?

Given the tool has 8 parameters, no output schema, and no annotations, the description is complete. It covers return type (structured diff with token deltas), error handling (missing context_main.json), and all parameter interactions, providing a fully sufficient guide for the agent.

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

Parameters4/5

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

All 8 parameters are described in the schema (100% coverage), and the description adds significant context beyond the schema—e.g., explaining default behaviors, examples for depth, and the effect of baseline values. This extra explanation enhances meaning without redundancy.

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 clearly states 'Compares current snapshot with baseline to detect changes' and specifies the types of changes detected (ADDED/REMOVED/CHANGED/UNCHANGED). It uses concrete verbs and resources, and distinguishes itself from sibling tools like logicstamp_refresh_snapshot by noting that it reads from disk or regenerates.

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 states 'Use after editing files to verify changes' and provides a comparison to Jest snapshots. It also advises when not to use it: if context_main.json is missing and forceRegenerate is false, the agent should first run refresh_snapshot or set forceRegenerate=true.

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/LogicStamp/logicstamp-mcp'

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