{
  "$schema": "https://modelcontextprotocol.io/schemas/tools-list-v1.json",
  "protocol_version": "2025-06-18",
  "server": {
    "name": "askbaily",
    "version": "0.1.0",
    "url": "https://askbaily.com/api/mcp/tools"
  },
  "tools": [
    {
      "name": "scope_project",
      "title": "Scope a remodel project",
      "description_for_model": "Capture a homeowner's project scope so AskBaily can match them to a single vetted contractor. Collects city, project_type, budget_range, timeline, and optional notes. Returns a scope_id and a structured scope summary. Call this once per homeowner conversation; reuse the scope_id in subsequent tools. Do not include phone/email in `notes` — contact info is collected only on consent via schedule_consult.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "additionalProperties": false,
        "required": ["city", "project_type", "budget_range", "timeline"],
        "properties": {
          "city": {
            "type": "string",
            "description": "City or metro name, e.g. 'Los Angeles', 'Phoenix', 'Austin'.",
            "minLength": 2,
            "maxLength": 80
          },
          "project_type": {
            "type": "string",
            "enum": [
              "kitchen",
              "bathroom",
              "adu",
              "full_home",
              "roofing",
              "hvac",
              "solar",
              "pool",
              "electrical",
              "plumbing",
              "flooring",
              "windows",
              "other"
            ]
          },
          "budget_range": {
            "type": "object",
            "additionalProperties": false,
            "required": ["low_usd", "high_usd"],
            "properties": {
              "low_usd": { "type": "integer", "minimum": 500 },
              "high_usd": { "type": "integer", "minimum": 1000 }
            }
          },
          "timeline": {
            "type": "string",
            "enum": ["asap", "1_3_months", "3_6_months", "6_12_months", "flexible"]
          },
          "notes": {
            "type": "string",
            "maxLength": 2000,
            "description": "Optional free-text project notes. Do not include phone/email."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": ["scope_id", "summary"],
        "properties": {
          "scope_id": { "type": "string" },
          "summary": { "type": "string" },
          "next_step_url": { "type": "string", "format": "uri" }
        }
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "examples": [
        {
          "name": "kitchen_la",
          "input": {
            "city": "Los Angeles",
            "project_type": "kitchen",
            "budget_range": { "low_usd": 25000, "high_usd": 60000 },
            "timeline": "1_3_months"
          },
          "output": {
            "scope_id": "scope_stub_kitchen_la_0001",
            "summary": "Kitchen remodel in Los Angeles, $25K–$60K, starting in 1–3 months.",
            "next_step_url": "https://askbaily.com/#chat?scope=scope_stub_kitchen_la_0001"
          }
        }
      ]
    },
    {
      "name": "find_contractor",
      "title": "Find the matched contractor for a scope",
      "description_for_model": "Given a scope_id, return the single AskBaily-matched contractor profile (business name, license number, license state, insurance verified, response window, one-line Baily review summary) or a waitlist slot if no matched contractor is available in that market. Read-only. Never returns contractor phone/email/address — contact is initiated via schedule_consult after explicit homeowner consent.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "additionalProperties": false,
        "required": ["scope_id"],
        "properties": {
          "scope_id": { "type": "string", "minLength": 1, "maxLength": 120 }
        }
      },
      "outputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": ["status"],
        "properties": {
          "status": {
            "type": "string",
            "enum": ["matched", "waitlist", "unavailable"]
          },
          "contractor": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "contractor_id": { "type": "string" },
              "business_name": { "type": "string" },
              "license_number": { "type": "string" },
              "license_state": { "type": "string" },
              "insurance_verified": { "type": "boolean" },
              "review_summary": { "type": "string" },
              "approximate_response_minutes": { "type": "integer" },
              "service_radius_miles": { "type": "integer" }
            }
          },
          "waitlist_position": { "type": "integer", "minimum": 1 }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "examples": [
        {
          "name": "matched_la",
          "input": { "scope_id": "scope_stub_kitchen_la_0001" },
          "output": {
            "status": "matched",
            "contractor": {
              "contractor_id": "npld",
              "business_name": "NP Line Design",
              "license_number": "1105249",
              "license_state": "CA",
              "insurance_verified": true,
              "review_summary": "A+ BBB, 5-star GBP, specialty in ADU + full-home remodels.",
              "approximate_response_minutes": 30,
              "service_radius_miles": 40
            }
          }
        }
      ]
    },
    {
      "name": "check_licensing",
      "title": "Verify a contractor license",
      "description_for_model": "Validate the format of a contractor license number for a specific jurisdiction and return a regulator deep-link plus the parsed status. Supports 17 jurisdictions: CA, AZ, NV, WA, FL, TX, GA, NY, NY-NYC, IL, ON (Ontario), UK, AU-NSW, AU-VIC, SG, AE-DUBAI, NZ. Read-only. Does not expose PII. Use when a homeowner names a contractor they are considering.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "additionalProperties": false,
        "required": ["state", "license_number"],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "CA",
              "AZ",
              "NV",
              "WA",
              "FL",
              "TX",
              "GA",
              "NY",
              "NY-NYC",
              "IL",
              "ON",
              "UK",
              "AU-NSW",
              "AU-VIC",
              "SG",
              "AE-DUBAI",
              "NZ"
            ]
          },
          "license_number": { "type": "string", "minLength": 2, "maxLength": 40 }
        }
      },
      "outputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": ["state", "license_number", "status", "verified_at"],
        "properties": {
          "state": { "type": "string" },
          "license_number": { "type": "string" },
          "status": {
            "type": "string",
            "enum": ["active", "inactive", "suspended", "revoked", "unknown"]
          },
          "business_name": { "type": "string" },
          "classifications": { "type": "array", "items": { "type": "string" } },
          "insurance_required": { "type": "boolean" },
          "regulator_url": { "type": "string", "format": "uri" },
          "verified_at": { "type": "string", "format": "date-time" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "examples": [
        {
          "name": "ca_valid",
          "input": { "state": "CA", "license_number": "1105249" },
          "output": {
            "state": "CA",
            "license_number": "1105249",
            "status": "active",
            "business_name": "NP Line Design Inc",
            "classifications": ["B"],
            "insurance_required": true,
            "regulator_url": "https://www.cslb.ca.gov/OnlineServices/CheckLicenseII/LicenseDetail.aspx?LicNum=1105249",
            "verified_at": "2026-04-21T00:00:00Z"
          }
        }
      ]
    },
    {
      "name": "get_cost_estimate",
      "title": "Get a city-level cost estimate",
      "description_for_model": "Return AskBaily's current cost-range estimate for a project type in a specific city. Pulls from the 75-city cost hub dataset (LA metro, Phoenix, Austin, Raleigh, Seattle, Toronto, London, Sydney, etc.). Read-only, no PII. Use this to set homeowner expectations before matching.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "additionalProperties": false,
        "required": ["city", "service"],
        "properties": {
          "city": { "type": "string", "minLength": 2, "maxLength": 80 },
          "service": {
            "type": "string",
            "enum": [
              "kitchen",
              "bathroom",
              "adu",
              "full_home",
              "roofing",
              "hvac",
              "solar",
              "pool",
              "electrical",
              "plumbing",
              "flooring",
              "windows"
            ]
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": ["city", "service", "currency", "low", "high"],
        "properties": {
          "city": { "type": "string" },
          "service": { "type": "string" },
          "currency": { "type": "string", "const": "USD" },
          "low": { "type": "integer" },
          "high": { "type": "integer" },
          "confidence": {
            "type": "string",
            "enum": ["high", "medium", "low"]
          },
          "permit_required": { "type": "boolean" },
          "source_url": { "type": "string", "format": "uri" }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "examples": [
        {
          "name": "kitchen_la",
          "input": { "city": "Los Angeles", "service": "kitchen" },
          "output": {
            "city": "Los Angeles",
            "service": "kitchen",
            "currency": "USD",
            "low": 25000,
            "high": 80000,
            "confidence": "high",
            "permit_required": true,
            "source_url": "https://askbaily.com/cost/los-angeles/kitchen"
          }
        }
      ]
    },
    {
      "name": "get_regulatory_context",
      "title": "Get regulatory callouts for a city / neighborhood",
      "description_for_model": "Return jurisdiction-specific permit and regulatory callouts (CA Title 24, LADBS, NYC DOB LL97, Seattle MHA, Ontario HCRA, etc.) scoped to a city and optional neighborhood. Read-only, no PII. Use when a homeowner asks about permits, HOAs, historic overlays, or structural requirements.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "additionalProperties": false,
        "required": ["city"],
        "properties": {
          "city": { "type": "string", "minLength": 2, "maxLength": 80 },
          "neighborhood": { "type": "string", "minLength": 2, "maxLength": 80 }
        }
      },
      "outputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": ["city", "callouts"],
        "properties": {
          "city": { "type": "string" },
          "neighborhood": { "type": "string" },
          "regulator_name": { "type": "string" },
          "regulator_url": { "type": "string", "format": "uri" },
          "callouts": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["title", "detail"],
              "properties": {
                "title": { "type": "string" },
                "detail": { "type": "string" },
                "source_url": { "type": "string", "format": "uri" }
              }
            }
          }
        }
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      },
      "examples": [
        {
          "name": "la_general",
          "input": { "city": "Los Angeles" },
          "output": {
            "city": "Los Angeles",
            "regulator_name": "LADBS",
            "regulator_url": "https://www.ladbs.org/",
            "callouts": [
              {
                "title": "Permit required for structural / electrical / plumbing work",
                "detail": "LADBS plan check required for most renovations beyond cosmetic scope.",
                "source_url": "https://www.ladbs.org/services/core-services/plan-check-permit"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "schedule_consult",
      "title": "Schedule a consultation with the matched contractor",
      "description_for_model": "Initiate a Baily-mediated consultation between a scoped homeowner and the matched contractor. Requires the homeowner's explicit consent (homeowner_consent_given must be true). No raw homeowner contact info is exposed to the contractor until the homeowner replies through Baily. Returns a consultation_id and status.",
      "inputSchema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "additionalProperties": false,
        "required": ["scope_id", "time_slot", "homeowner_consent_given"],
        "properties": {
          "scope_id": { "type": "string", "minLength": 1, "maxLength": 120 },
          "time_slot": {
            "type": "string",
            "format": "date-time",
            "description": "ISO-8601 date-time for the preferred consultation slot."
          },
          "homeowner_consent_given": {
            "type": "boolean",
            "description": "Must be true. Indicates the homeowner explicitly consents to Baily-mediated contact."
          }
        }
      },
      "outputSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": ["consultation_id", "status"],
        "properties": {
          "consultation_id": { "type": "string" },
          "status": {
            "type": "string",
            "enum": ["pending", "contractor_notified", "scheduled", "declined"]
          },
          "baily_thread_url": { "type": "string", "format": "uri" }
        }
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true
      },
      "examples": [
        {
          "name": "pending_consult",
          "input": {
            "scope_id": "scope_stub_kitchen_la_0001",
            "time_slot": "2026-04-25T17:00:00Z",
            "homeowner_consent_given": true
          },
          "output": {
            "consultation_id": "consult_stub_0001",
            "status": "pending",
            "baily_thread_url": "https://askbaily.com/#chat?consult=consult_stub_0001"
          }
        }
      ]
    }
  ]
}
