Structural Change Controller for AI-assisted Python development — baseline-aware, deterministic, built for CI and AI agents. MCP runtime for repository analysis, change control, engineering memory, and blast radius assessment.
CodeClone MCP server demonstrates strong schema completeness and well-structured tool definitions. All 21 tools have explicit input schemas with type information and descriptions. Tool names follow verb_noun conventions (analyze_*, get_*, query_*, manage_*, check_*, create_*, validate_*, finish_*, help). Descriptions are detailed and domain-specific, ranging from 150-400+ characters, which exceeds the baseline average (194 chars). However, output schemas are not explicitly documented in the provided code, limiting full scoring. Parameter descriptions are comprehensive but could benefit from more explicit constraint documentation (enums, ranges). Some descriptions are quite technical and could be optimized for LLM decision-making by adding clearer 'when to use' guidance.
Run changed-files analysis from explicit paths or git diff ref. Absolute root required. MCP cache_policy: reuse or off. Response includes next_tool hint.
Run a deterministic CodeClone analysis and register it as the latest MCP run. Pass an absolute repository root; relative roots like '.' are rejected in MCP. MCP cache_policy accepts reuse or off only. Start with get_production_triage.
Pre-edit budget query (mode='budget') or post-edit structural verification (mode='verify'). Composes stored runs, gate evaluation, run comparison, and session-local change intent without running analysis or mutating repository state.
Generate a deterministic, auditable review receipt from stored MCP state: report provenance, intent scope, blast radius, reviewed findings, patch contract status, human decision points, and claims-not-made. Output markdown or JSON without mutating repository state.
Verify post-edit state against intent: compare before/after structural metrics, detect scope drift, check patch contract, validate coverage, enforce baseline gates, and audit governance decisions. Mutates workspace_intent state. Produces patch trail and optional review receipt. Returns verdicts and edit authorization status.
Output schemas not explicitly documented in source code. While input schemas are complete and type-annotated, response structures are not formally defined in the tool definitions visible in the provided code. This forces LLMs to infer response structure from descriptions alone.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 73 | 2026-07-28+ | v2 |
Fetch a durably stored start-time blast artifact from the audit trail by run id, blast artifact id, and/or projection digest, exactly as it was persisted when start_controlled_change produced its slim summary. It is never re-derived from current state. Returns the full omitted blast projection for direct/transitive dependents, clone cohorts, review context, cycles, and risk details. Durability is bounded by audit retention. Fail-closed statuses: ok, not_found, ambiguous, digest_mismatch, artifact_id_mismatch, malformed_stored_blast_artifact, unsupported_format. Read-only; does not mutate repository state.
Return the deterministic structural risk boundary for changing the given files. Shows direct dependents, clone cohort members, coverage gaps, actionable do-not-touch paths, and review-only context. Optional include selects payload lanes: imports (direct/transitive dependents), clone_cohorts, coverage, risk_signals, do_not_touch, review_context, cycles — not dependents or risk alone. Derived from the canonical report; no new analysis is performed.
Return deterministic, bounded implementation context from one existing analysis run. Resolves explicit repo-relative paths and module:symbol qualnames, then projects module, dependency, API-surface, call/reference, blast-radius, cache-origin, and workspace-freshness facts without re-analysis or edit authorization.
Fetch an exact implementation-context facet page from the session-local projection artifact created by get_implementation_context. Requires the analysis.context_projection_digest returned by that response and a facet page key such as public_surface, callers, memory, trajectories, or definition_sites. Returns not_found when the projection is no longer in MCP run history; never recomputes fresh context while claiming exactness. Read-only; does not mutate repository state.
Return an exact page for a get_relevant_memory omitted tail using the digest-bound cursor from continuation.lanes.*.page. The page fails closed with snapshot_mismatch if the underlying memory projection no longer matches the cursor identity.
Fetch a durably stored patch trail from the audit trail by run id and/or patch-trail digest, exactly as it was computed. It survives auto_clear and is never re-derived from current state. Returns the full forensic trail (declared/changed/untouched files, scope check, verification, workspace hygiene, evidence) that the default response omits or summarizes. At least one lookup key is required; if both are given they must identify the same trail. Durability is bounded by audit retention. Fail-closed statuses: ok, not_found, ambiguous, digest_mismatch, malformed_stored_patch_trail, unsupported_format. Read-only; does not mutate repository state.
Return a production-first triage view over a stored run: health, cache freshness, production hotspots, and production suggestions, while keeping global source-kind counters visible. Use this as the default first-pass review on noisy repositories.
Return ranked, evidence-linked engineering memory for the declared edit scope. Requires absolute root (same as analyze_repository). Pass scope paths and/or an active intent_id from start_controlled_change; symbols-only retrieval is also supported. Unscoped project-wide retrieval is rejected — use query_engineering_memory(mode=status|search) instead. List responses default to compact statement previews; pass detail_level=full for complete statements. Scoped responses may also include typed trajectory precedents in trajectories[]; records[] remains memory records only. When a lane has an omitted tail, continuation.lanes.*.page provides a digest-bound cursor for get_memory_projection_page. Read-only; does not mutate the memory database.
Fetch a durably stored review receipt from the audit trail by run id and/or receipt digest, exactly as it was created. It survives auto_clear and is never re-derived from current state. Returns the canonical typed receipt (format='structured', the default) or its rendered markdown (format='markdown'). At least one lookup key is required; if both are given they must identify the same receipt. Durability is bounded by audit retention. Fail-closed statuses: ok, not_found, ambiguous, digest_mismatch, malformed_stored_receipt, unsupported_format. Read-only; does not mutate repository state.
Compact run snapshot for latest or specified run. run_id accepts 8-char short id or full digest.
Bounded workflow/contract guidance with doc links. topic=overview returns a compact topic index. compact adds anti_patterns; normal adds warnings. Topics: overview, workflow, analysis_profile, suppressions, baseline, coverage, latest_runs, review_state, changed_scope, change_control, trust_boundaries, engineering_memory, implementation_context, verification_profiles, observability.
Engineering memory governance. Agent actions: refresh_from_run, record_candidate, promote_experience, validate_claims, propose_from_receipt, rebuild_semantic_index, rebuild_trajectories, enqueue_projection_rebuild, projection_rebuild_status, run_projection_jobs_once. promote_experience(experience_id) turns a distilled experience into a human-approvable draft. approve/reject/archive are not available to agents — use VS Code Memory view.
Mode-based engineering memory inspection router. Modes: search, get, for_path, for_symbol, stale, drafts, coverage, status, trajectory_status, trajectory_search, trajectory_get, experience_get, trajectory_anomalies, trajectory_agents, and trajectory_dashboard. List modes default to compact previews; mode=get and detail_level=full return complete statements. mode=trajectory_get uses record_id as the trajectory id; mode=experience_get uses record_id as the experience id. mode=coverage requires scope=; path= is a single-path alias when scope is omitted. Project root is not a valid path or coverage scope. Read-only.
Read-only sectioned diagnostics over CodeClone's own runtime telemetry. Observability is for CodeClone self-development and diagnostics. It is NOT part of user-facing CodeClone analysis. It MUST NOT affect reports, gates, baselines, memory facts, or edit authorization. A slicer, not a trace export API: each call returns one bounded section, never the full trace, numeric metrics only (no raw SQL or payloads). Anti-inference guard: this describes the runtime of CodeClone itself, not the user repository — high DB queries != repository bad; high MCP payload != code quality low; hot semantic reindex != unsafe change. Sections: summary, slow_operations, memory_pipeline_cost, db_cost, agent_context.
Declare an edit scope, compute blast radius, run budget check, and generate an unforgettable intent_id. Requires run_id from a prior analysis. Intent survives until finish_controlled_change or session clear. Scope: explicit files or git diff. Budget: pre-edit gate (cost-of-change). Blast: direct/transitive dependents, clone cohorts, coverage gaps, risk signals. Changes to git-tracked files outside scope are detected at finish. Governance: optional IDE client and ticket metadata.
Validate cited review text against canonical report semantics. Detects deterministic mischaracterizations: Security Surfaces called vulnerabilities, report-only signals called CI failures, known baseline debt called new relative to baseline, patch-local regression claims without before/after evidence, dead code claimed where runtime reachability evidence exists, fixes claimed without post-patch verification, and regression-free claims when patch_health_delta is negative. Pass patch_health_delta from check_patch_contract verify or finish verification.structural_delta. Structural citation matching; not NLP.
Parameter constraint documentation lacks explicit enums and ranges. Many parameters accept constrained values (e.g., 'reuse' or 'off' for cache_policy, 'compact' or 'full' for detail_level) but are documented as free-form strings rather than as enum-constrained parameters. This invites LLM hallucination of invalid values.
Error handling and recovery guidance not visible in tool descriptions. Descriptions omit explicit error classification (retryable vs. user-fixable vs. fatal), expected failure modes, or actionable next steps when a tool fails. For example, 'get_blast_artifact' mentions fail-closed statuses but does not explain what an LLM should do when it encounters 'not_found' or 'ambiguous'.
Limited LLM-friendly 'when to use' guidance. Descriptions focus heavily on domain semantics and technical details (e.g., 'Derived from the canonical report; no new analysis is performed') rather than decision guidance for LLM tool selection. Descriptions should clarify: Use this tool when X, not when Y. Call this tool first to Z.
No explicit idempotency or confirmation patterns for destructive tools. 'finish_controlled_change' is marked WRITE and mutates state but does not document idempotency guarantees or support a dry-run confirmation step. Agents retrying on ambiguous failures could apply changes twice.