CodeLoop

Tool Reference

CodeLoop provides 7 MCP tools that your AI agent can call. Each tool returns structured JSON results that the agent uses to make decisions.

codeloop_verify

The primary verification tool. Runs build, lint, tests, and optionally captures screenshots — all in a single call.

Parameters

ParameterTypeRequiredDescription
project_typestringNoAuto-detected. Override with “flutter”, “react”, “nextjs”, etc.
include_screenshotsbooleanNoCapture screenshots after build (default: true if UI project)
test_filterstringNoRun only matching tests (e.g., “auth”)

Example Output

{
  "status": "fail",
  "build": { "passed": true, "duration_ms": 4200 },
  "lint": { "passed": true, "warnings": 3 },
  "tests": {
    "passed": 12,
    "failed": 2,
    "skipped": 0,
    "failures": [
      { "name": "AuthService.login", "error": "Expected 200, got 401" },
      { "name": "UserProfile.render", "error": "Missing required prop" }
    ]
  },
  "screenshots": {
    "captured": 3,
    "paths": ["screenshots/home.png", "screenshots/login.png", "screenshots/dashboard.png"]
  },
  "confidence": 0.72
}

codeloop_diagnose

Analyzes verification failures and produces categorized repair tasks, prioritized by severity.

Parameters

ParameterTypeRequiredDescription
verification_resultobjectYesThe output from codeloop_verify

Example Output

{
  "issues": [
    {
      "category": "bug",
      "severity": "high",
      "description": "AuthService.login returns 401 for valid credentials",
      "file": "src/services/auth.ts",
      "line": 42,
      "repair_task": "Check password comparison logic in AuthService.login"
    },
    {
      "category": "type_error",
      "severity": "medium",
      "description": "UserProfile missing required 'email' prop",
      "file": "src/components/UserProfile.tsx",
      "line": 15,
      "repair_task": "Add email prop to UserProfile usage in Dashboard"
    }
  ],
  "priority_order": ["AuthService.login", "UserProfile.render"]
}

codeloop_gate_check

Performs a confidence-scored quality gate check. Returns pass/fail with a numerical confidence score.

Parameters

ParameterTypeRequiredDescription
section_namestringNoName of the section being gated
min_confidencenumberNoMinimum confidence to pass (default: 0.85)

Example Output

{
  "passed": true,
  "confidence": 0.94,
  "checks": {
    "build": "pass",
    "lint": "pass",
    "tests": "pass",
    "no_regressions": "pass"
  },
  "recommendation": "Section meets quality threshold. Safe to proceed."
}

codeloop_section_status

Tracks progress across multiple project sections for autonomous multi-section development.

Parameters

ParameterTypeRequiredDescription
actionstringYes“get”, “update”, or “next”
section_namestringFor updateSection to update
statusstringFor update“pending”, “in_progress”, “completed”, “blocked”

codeloop_visual_review

Captures screenshots across multiple viewports and compares them against baselines for visual regression detection.

Parameters

ParameterTypeRequiredDescription
urlstringYesURL to screenshot
viewportsarrayNoViewport sizes (default: mobile, tablet, desktop)
compare_baselinebooleanNoCompare against stored baseline (default: true)

codeloop_design_compare

Compares the coded UI against a design specification (Figma export, reference image, or design URL).

Parameters

ParameterTypeRequiredDescription
actual_urlstringYesURL of the coded UI
design_referencestringYesPath to design image or Figma URL

codeloop_release_readiness

Comprehensive release quality check that evaluates whether the project (or section) is ready for human review.

Parameters

ParameterTypeRequiredDescription
sectionsarrayNoSpecific sections to check (default: all)
include_visualbooleanNoInclude visual review in readiness check

Example Output

{
  "ready": true,
  "overall_confidence": 0.91,
  "sections": [
    { "name": "authentication", "confidence": 0.95, "status": "pass" },
    { "name": "dashboard", "confidence": 0.88, "status": "pass" },
    { "name": "settings", "confidence": 0.90, "status": "pass" }
  ],
  "recommendation": "Project meets release criteria. Ready for human UAT."
}

Next Steps