{
 "openapi": "3.1.0",
 "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
 "info": {
  "title": "AstraNL core tools (plain HTTPS)",
  "version": "1.0.0",
  "summary": "Five read-only tools for renovation work in the Netherlands, no key and no signup.",
  "description": "The same five tools as the MCP core profile (https://astranl.com/mcp/streamable?profile=core), as plain HTTPS. The body of each call is the tool arguments; the answer is the tool answer text byte for byte, so an estimate receipt verifies. Errors use one envelope: /agents/core/errors.json. Changes are additive only: /agents/core/changelog.json. An estimate is a planning figure, not a quote. AstraNL never orders, books or pays.",
  "contact": {
   "name": "AstraNL",
   "url": "https://astranl.com/support",
   "email": "hello@astranl.com"
  },
  "termsOfService": "https://astranl.com/terms"
 },
 "externalDocs": {
  "url": "https://astranl.com/agents/core/",
  "description": "Copy-paste examples"
 },
 "servers": [
  {
   "url": "https://astranl.com"
  }
 ],
 "security": [],
 "paths": {
  "/api/core/v1/tools/astranl_renovation_estimate_nl": {
   "post": {
    "operationId": "astranl_renovation_estimate_nl",
    "summary": "Renovation cost estimate, Netherlands (verbouwing kosten)",
    "description": "Rough cost of a renovation or home repair job in the Netherlands (verbouwing kosten, renovatie kosten, schilderen kosten per m2, renovation cost Netherlands). Call it when someone asks what a job such as painting, roofing, flooring, plumbing, insulation or a general renovation will roughly cost in a Dutch city, before quotes are requested. Input: one job category, the area in m2 and the city. Returns a planning figure in EUR: labour hours (h) times an hourly rate (EUR per hour, excluding VAT) plus the listed material lines in EUR, a low, typical and high range in EUR, the VAT basis of every amount, the source and date of every figure, as_of, the answer schema version and a signed receipt that can be checked offline against the published AstraNL log key. A planning figure for one job category, not a quote and not the full scope of a job. Same input and answer as estimate_cost. Read-only, free, no account.",
    "x-astranl-read-only": true,
    "x-astranl-side-effects": "appends one digest entry (hashes of the question and the answer, not their content) to the public AstraNL log as the receipt",
    "x-mcp-tool": {
     "server": "https://astranl.com/mcp/streamable?profile=core",
     "name": "astranl_renovation_estimate_nl",
     "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true,
      "title": "Renovation cost estimate, Netherlands (verbouwing kosten)"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "properties": {
         "category": {
          "type": "string",
          "enum": [
           "painting",
           "cleaning",
           "plumbing",
           "roofing",
           "renovation",
           "electrical",
           "garden",
           "repair",
           "moving",
           "construction",
           "delivery",
           "logistics",
           "energy",
           "solar",
           "hvac",
           "automotive",
           "welding",
           "manufacturing",
           "installation",
           "maintenance",
           "inspection",
           "carpentry",
           "flooring",
           "demolition",
           "insulation",
           "glazing"
          ],
          "description": "The closest trade word, for example renovation, painting, plumbing, roofing, flooring. Same enum as create_task."
         },
         "area_m2": {
          "type": "number",
          "description": "Surface area or working volume in square meters. Optional but improves accuracy. For non-area tasks pass 0 for a labour-only planning figure. Omitting area_m2 assumes 20 m2. Send a JSON number such as 40, not the text \"40\".",
          "minimum": 0,
          "maximum": 100000
         },
         "location": {
          "type": "string",
          "description": "City in the Netherlands. Optional; defaults to Netherlands. No regional price adjustment is applied (location_mult = 1.0).",
          "maxLength": 80
         }
        },
        "required": [
         "category"
        ],
        "type": "object",
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "the tool answer",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/EstimateAnswer"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/400"
     },
     "404": {
      "$ref": "#/components/responses/404"
     },
     "413": {
      "$ref": "#/components/responses/413"
     },
     "422": {
      "$ref": "#/components/responses/422"
     },
     "429": {
      "$ref": "#/components/responses/429"
     },
     "503": {
      "$ref": "#/components/responses/503"
     }
    }
   }
  },
  "/api/core/v1/tools/astranl_contractor_check_nl": {
   "post": {
    "operationId": "astranl_contractor_check_nl",
    "summary": "Contractor check before paying, Netherlands (aannemer controleren)",
    "description": "Check a Dutch or EU company before paying an advance or signing with it (aannemer controleren, KvK nummer controleren, btw-nummer controleren, contractor check Netherlands). Call it when someone is about to pay a deposit or invoice to a contractor or supplier, or sign with it, and has its KvK number (8 digits, sent as text), company name or EU VAT number. Returns verdicts, not register data: active KvK registration yes or no, name match (EXACT, NORMALIZED_MATCH or NO_MATCH), VAT number valid in VIES, EU sanctions list candidates, a published insolvency under the KvK number, open questions and a check_id. A KvK register query is paid: 0.25 EUR per sealed call on https://astranl.com/api/contractor-check/sealed with an agent key; through this tool a call with a kvk_number answers payment_required with that route and reads nothing. The VIES and sanctions screening without a KvK number are free. It does not tell who may sign for the company, whether an IBAN belongs to it or its credit risk. Same input and answer as check_counterparty_nl. Read-only.",
    "x-astranl-read-only": true,
    "x-astranl-side-effects": "none",
    "x-mcp-tool": {
     "server": "https://astranl.com/mcp/streamable?profile=core",
     "name": "astranl_contractor_check_nl",
     "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": true,
      "readOnlyHint": true,
      "title": "Contractor check before paying, Netherlands (aannemer controleren)"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "properties": {
         "kvk_number": {
          "type": "string",
          "maxLength": 12,
          "description": "Dutch KvK number, exactly 8 digits, sent as text so a leading zero is kept, as printed on the invoice, quote, contract or website imprint"
         },
         "company_name": {
          "type": "string",
          "maxLength": 200,
          "description": "the company name exactly as your document or contact states it"
         },
         "vat_number": {
          "type": "string",
          "maxLength": 20,
          "description": "EU VAT number with country prefix, for example NL810433941B01"
         },
         "city": {
          "type": "string",
          "maxLength": 80,
          "description": "not used; kept for compatibility, AstraNL does not search the register by name"
         },
         "purpose": {
          "type": "string",
          "maxLength": 200,
          "description": "optional: the next action you are about to take, for example approve supplier or pay invoice"
         }
        },
        "type": "object",
        "minProperties": 1,
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "the tool answer",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Answer"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/400"
     },
     "404": {
      "$ref": "#/components/responses/404"
     },
     "413": {
      "$ref": "#/components/responses/413"
     },
     "422": {
      "$ref": "#/components/responses/422"
     },
     "429": {
      "$ref": "#/components/responses/429"
     },
     "503": {
      "$ref": "#/components/responses/503"
     }
    }
   }
  },
  "/api/core/v1/tools/astranl_permit_rules_nl": {
   "post": {
    "operationId": "astranl_permit_rules_nl",
    "summary": "Building permit fee and skip rule of a Dutch municipality (bouwleges)",
    "description": "Permit fee and skip rule of a Dutch municipality for a renovation or building job (bouwleges, leges omgevingsvergunning, container op straat vergunning, building permit cost Netherlands). Call it when someone plans building work in a Dutch municipality and asks what the omgevingsvergunning costs, or whether a skip or container on the street needs a permit. Input: the municipality name or CBS code (for example Zaanstad or GM0479) and the planned construction cost in EUR excluding VAT as bouwkosten_eur (default 50000). Returns the 2026 leges fee in EUR for the technical building activity, whether a street container needs a permit, a notification or nothing with its fee and precario in EUR where confirmed, and for each the regulation, article, source URL and read date. The municipality decides; spatial permit parts are not included. Same input and answer as nl_municipal_build_rules. Read-only, free.",
    "x-astranl-read-only": true,
    "x-astranl-side-effects": "none",
    "x-mcp-tool": {
     "server": "https://astranl.com/mcp/streamable?profile=core",
     "name": "astranl_permit_rules_nl",
     "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true,
      "title": "Building permit fee and skip rule of a Dutch municipality (bouwleges)"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "properties": {
         "municipality": {
          "type": "string",
          "minLength": 2,
          "maxLength": 80,
          "description": "Dutch municipality name or CBS code, e.g. Zaanstad or GM0479"
         },
         "bouwkosten_eur": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000,
          "description": "planned construction cost excluding VAT in euro; default 50000"
         }
        },
        "required": [
         "municipality"
        ],
        "type": "object",
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "the tool answer",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Answer"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/400"
     },
     "404": {
      "$ref": "#/components/responses/404"
     },
     "413": {
      "$ref": "#/components/responses/413"
     },
     "422": {
      "$ref": "#/components/responses/422"
     },
     "429": {
      "$ref": "#/components/responses/429"
     },
     "503": {
      "$ref": "#/components/responses/503"
     }
    }
   }
  },
  "/api/core/v1/tools/astranl_material_price_nl": {
   "post": {
    "operationId": "astranl_material_price_nl",
    "summary": "Building material price and stock in Dutch stores (bouwmaterialen prijs)",
    "description": "Current price and stock of one building material in Dutch stores (bouwmaterialen prijs, prijs gipsplaat, building material price Netherlands). Call it when someone needs the price or availability of a specific product, given as a GTIN or EAN barcode, a store product link, or plain words to get candidates first. Returns each offer of the same trade item with the price in EUR including VAT, stock and read time per store, the identical item at other stores, the cheapest available offer and the status of each source; a Dutch postcode adds delivery cost in EUR and dates. Seller prices at read time, not a quote; it never orders, reserves or pays. Same input and answer as check_material. Read-only, free.",
    "x-astranl-read-only": true,
    "x-astranl-side-effects": "none",
    "x-mcp-tool": {
     "server": "https://astranl.com/mcp/streamable?profile=core",
     "name": "astranl_material_price_nl",
     "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": true,
      "readOnlyHint": true,
      "title": "Building material price and stock in Dutch stores (bouwmaterialen prijs)"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "properties": {
         "ref": {
          "type": "string",
          "minLength": 1,
          "maxLength": 600,
          "description": "a GTIN or EAN with valid check digit (e.g. 8710839100056), a Bouwmaat, Hubo or Houtdirect product link with ?variant=, a partner shop product link, store:variant (e.g. hubo:48564194312444), or plain words for candidates"
         },
         "postcode": {
          "type": "string",
          "pattern": "^[1-9][0-9]{3}(?: ?[A-Za-z]{2})?$",
          "description": "Dutch delivery postcode: 1234AB, 1234 AB or 1234. Adds per-offer delivery quotes."
         },
         "quantity": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000,
          "default": 1,
          "description": "Number of store units as sold, from 1 to 10000. Packs are not converted."
         },
         "need_date": {
          "type": "string",
          "format": "date",
          "description": "ISO planning date (YYYY-MM-DD), passed as the order date for delivery quotes; defaults to today in Europe/Amsterdam."
         },
         "detail": {
          "type": "string",
          "enum": [
           "short",
           "full"
          ],
          "default": "short",
          "description": "short (default): at most three offers to show the person; full: every offer, delivery rule and source."
         }
        },
        "required": [
         "ref"
        ],
        "type": "object",
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "the tool answer",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Answer"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/400"
     },
     "404": {
      "$ref": "#/components/responses/404"
     },
     "413": {
      "$ref": "#/components/responses/413"
     },
     "422": {
      "$ref": "#/components/responses/422"
     },
     "429": {
      "$ref": "#/components/responses/429"
     },
     "503": {
      "$ref": "#/components/responses/503"
     }
    }
   }
  },
  "/api/core/v1/tools/astranl_verify_receipt": {
   "post": {
    "operationId": "astranl_verify_receipt",
    "summary": "Verify an AstraNL receipt or reference",
    "description": "Check whether an AstraNL reference or receipt is genuine (verify receipt, controleer bewijs). Call it when you hold an AstraNL id such as alk_..., ASTRA-A-..., ASTRA-C-..., att_... or RCPT-n, for example receipt.reference of an astranl_renovation_estimate_nl answer, and need to know whether it is real and what it confirms. Returns the integrity checks (hashes, Ed25519 signature, Merkle inclusion), the attested claim with issuer, time, validity and status, and when to check again. An estimate receipt can also be checked offline with the published key, without this call. Same input and answer as verify_astranl. Read-only, free.",
    "x-astranl-read-only": true,
    "x-astranl-side-effects": "none",
    "x-mcp-tool": {
     "server": "https://astranl.com/mcp/streamable?profile=core",
     "name": "astranl_verify_receipt",
     "annotations": {
      "destructiveHint": false,
      "idempotentHint": true,
      "openWorldHint": false,
      "readOnlyHint": true,
      "title": "Verify an AstraNL receipt or reference"
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "properties": {
         "ref": {
          "type": "string",
          "minLength": 4,
          "maxLength": 64,
          "description": "Any AstraNL reference: action receipt ASTRA-A-..., policy receipt ASTRA-R-..., consumption or agreement certificate ASTRA-C-..., log event alk_..., attestation att_/atr_..., ingress receipt RCPT-n"
         },
         "answer_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
         }
        },
        "required": [
         "ref"
        ],
        "type": "object",
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "the tool answer",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Answer"
        }
       }
      }
     },
     "400": {
      "$ref": "#/components/responses/400"
     },
     "404": {
      "$ref": "#/components/responses/404"
     },
     "413": {
      "$ref": "#/components/responses/413"
     },
     "422": {
      "$ref": "#/components/responses/422"
     },
     "429": {
      "$ref": "#/components/responses/429"
     },
     "503": {
      "$ref": "#/components/responses/503"
     }
    }
   }
  },
  "/api/core/v1/status": {
   "get": {
    "operationId": "core_status",
    "summary": "Live status of the core door",
    "description": "Probed by AstraNL itself at request time (tools/list, one tool call, the receipt key), cached 60 s. Not an external monitor.",
    "responses": {
     "200": {
      "description": "status",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "status",
          "checks",
          "checked_at"
         ],
         "properties": {
          "status": {
           "enum": [
            "operational",
            "degraded",
            "down"
           ]
          },
          "checks": {
           "type": "object"
          },
          "checked_at": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/core/v1/sandbox/cases": {
   "post": {
    "operationId": "sandbox_case_create",
    "summary": "Create a labelled synthetic sandbox case",
    "description": "Stateless: no case is stored, no engine, provider or real case is touched, nothing is counted in any case, estimate or business metric and nothing is written to the AstraLock log; the request passes ordinary request telemetry like any request. The case moves created, offers_ready (30 s), completed with synthetic unsigned evidence (90 s).",
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "additionalProperties": true
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "sandbox case",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "sandbox",
          "synthetic",
          "label",
          "case_id",
          "state"
         ],
         "properties": {
          "sandbox": {
           "const": true
          },
          "synthetic": {
           "const": true
          },
          "label": {
           "type": "string"
          },
          "case_id": {
           "type": "string",
           "pattern": "^SBX-"
          },
          "state": {
           "enum": [
            "created",
            "offers_ready",
            "completed"
           ]
          },
          "offers": {
           "type": "array"
          },
          "evidence": {
           "type": "object"
          }
         }
        }
       }
      }
     },
     "413": {
      "$ref": "#/components/responses/413"
     }
    }
   }
  },
  "/api/core/v1/sandbox/cases/{case_id}": {
   "get": {
    "operationId": "sandbox_case_status",
    "summary": "State of a sandbox case",
    "parameters": [
     {
      "name": "case_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^SBX-[0-9a-z]{6,8}-[0-9a-f]{10}$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "sandbox case",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "sandbox",
          "synthetic",
          "label",
          "case_id",
          "state"
         ],
         "properties": {
          "sandbox": {
           "const": true
          },
          "synthetic": {
           "const": true
          },
          "label": {
           "type": "string"
          },
          "case_id": {
           "type": "string",
           "pattern": "^SBX-"
          },
          "state": {
           "enum": [
            "created",
            "offers_ready",
            "completed"
           ]
          },
          "offers": {
           "type": "array"
          },
          "evidence": {
           "type": "object"
          }
         }
        }
       }
      }
     },
     "404": {
      "$ref": "#/components/responses/404"
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "Error": {
    "type": "object",
    "required": [
     "error"
    ],
    "properties": {
     "error": {
      "type": "object",
      "required": [
       "code",
       "message",
       "retryable"
      ],
      "properties": {
       "code": {
        "type": "string",
        "description": "stable lower_snake code, listed at /agents/core/errors.json"
       },
       "message": {
        "type": "string"
       },
       "retryable": {
        "type": "boolean"
       },
       "field": {
        "type": "string"
       },
       "do_next": {
        "type": "string"
       },
       "nothing_done": {
        "type": "boolean"
       }
      },
      "additionalProperties": true
     }
    }
   },
   "Receipt": {
    "type": "object",
    "description": "AstraLock signed log event; verify offline with receipt.verify_offline and the key in /.well-known/jwks.json, or online with astranl_verify_receipt",
    "required": [
     "kind",
     "state",
     "reference"
    ],
    "properties": {
     "kind": {
      "type": "string",
      "const": "astranl.estimate_receipt/1.0"
     },
     "state": {
      "type": "string",
      "description": "signed, or unavailable/pending under log contention"
     },
     "reference": {
      "type": "string",
      "pattern": "^alk_[0-9a-f]+$"
     },
     "payload": {
      "type": "object"
     },
     "envelope": {
      "type": "object"
     },
     "signature": {
      "type": "string"
     },
     "key_id": {
      "type": "string"
     },
     "verify_offline": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "verify_online": {
      "type": "object"
     }
    },
    "additionalProperties": true
   },
   "Answer": {
    "type": "object",
    "description": "the tool answer exactly as the core MCP profile serves it",
    "additionalProperties": true
   },
   "EstimateAnswer": {
    "type": "object",
    "required": [
     "estimate",
     "answer_meta",
     "receipt"
    ],
    "properties": {
     "estimate": {
      "type": "object"
     },
     "answer_meta": {
      "type": "object"
     },
     "receipt": {
      "$ref": "#/components/schemas/Receipt"
     }
    },
    "additionalProperties": true
   }
  },
  "responses": {
   "400": {
    "description": "invalid request or body not JSON",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "404": {
    "description": "unknown tool or id",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "413": {
    "description": "body larger than 16 KiB",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "422": {
    "description": "validation: a field is wrong; error.field and error.do_next say what to change",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "429": {
    "description": "rate limited; retry later",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   },
   "503": {
    "description": "a source or the tool door is unavailable; retryable",
    "content": {
     "application/json": {
      "schema": {
       "$ref": "#/components/schemas/Error"
      }
     }
    }
   }
  }
 }
}