MEGAINFRA-WEBAPP/docs/setup/connection-check-results.json

762 lines
29 KiB
JSON

{
"checkedAt": "2026-10-04T22:25:50.524Z",
"timezone": "Africa/Johannesburg",
"localAuthMode": "pin",
"checks": [
{
"check": "MCP initialize",
"passed": true,
"server": {
"name": "mega-infrastructure",
"version": "1.0.0"
}
},
{
"check": "MCP tools/list",
"passed": true,
"toolCount": 27,
"tools": [
{
"name": "list_sites",
"description": "List every construction site with its contract value, total spent, percent burnt, projected final cost and projected profit. Use this for portfolio-wide questions like 'how are my sites doing' or 'which site is losing money'.",
"inputSchema": {
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "site_report",
"description": "Visual report for ONE site: KPI tiles, burn by category, weekly income vs expenses, daily fuel, top payroll, open POs and fuel attention, with charts. Use for '/site', 'report on X', 'show me X'. Accepts a site name, project code or id.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
}
},
"required": [
"site"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "portfolio_report",
"description": "Visual report across ALL sites: contract vs spent vs projected, burn vs time elapsed, and which sites are at risk. Use for '/portfolio' or 'how are all my sites doing'.",
"inputSchema": {
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "problem_report",
"description": "Problem report: everything wrong right now, ranked high/medium/low — sites heading for a loss or over plan, fuel alerts, fuel limits in the wrong unit, rejected hour-meter readings, failed imports, delivery notes stuck in the work queue, unverified and overdue purchase orders, missed scan-outs, sites with no income recorded. Each finding has a display-ready title, detail and dashboard link. Use for '/problems', 'what's wrong', 'what needs my attention'. Optionally one site.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id; omit for all sites"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "improvement_report",
"description": "Room-for-improvement report: setup and data-quality gaps that make the dashboard's figures less trustworthy — sites missing hours/week, start date, duration or map location; vehicles with no unit type or fuel limit; plant with no cost per hour; possible duplicate vehicles; workers with no rate or no site; test-looking entries; monthly overheads not yet logged this month. Each finding has a display-ready title, detail and link. Use for '/improvements', 'what should we clean up', 'how can the numbers be more accurate'. Optionally one site.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id; omit for all sites"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_site_financials",
"description": "Full financial breakdown for ONE site: contract value, spend split by overheads/payroll/materials/fuel, remaining budget, and the projected final cost and profit at the current run rate. Use for 'what is my projected profit on X' or 'where is the money going on X'. Accepts a site name, project code, or id.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code (e.g. C26/09), or record id"
}
},
"required": [
"site"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_site_trend",
"description": "Income versus expenses over time for one site, bucketed by month (default, last 6) or week (last 8). Use for 'how did spending trend on X' or 'was X profitable last month'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or record id"
},
"granularity": {
"type": "string",
"enum": [
"month",
"week"
],
"description": "Defaults to month"
}
},
"required": [
"site"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "vehicles_needing_attention",
"description": "Vehicles whose fuel consumption breaches their configured limit, with alert and warning counts. Alerts are more than 20% worse than the limit; warnings are any shortfall. Dismissed vehicles are excluded unless includeDismissed is true. Use for 'which vehicles need attention', 'which trucks are burning too much fuel'.",
"inputSchema": {
"type": "object",
"properties": {
"includeDismissed": {
"type": "boolean",
"description": "Include vehicles whose alert the user already acknowledged"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_fuel_summary",
"description": "Fleet-wide fuel totals: litres, spend at the current pump rate, number of vehicles, and how many fill-ups are flagged. Use for 'how much am I spending on fuel' or 'what is my total fuel usage'.",
"inputSchema": {
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_pending_verification",
"description": "Purchase orders and delivery notes still awaiting human verification. Use for 'what needs my approval', 'what is outstanding', 'what should I look at today'.",
"inputSchema": {
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_purchase_order",
"description": "Full detail for ONE purchase order including every line item: material code, description, quantity ordered, quantity still outstanding, unit, rate and amount. Use for 'what's on PO X', 'what did we order from supplier Y on that PO', 'what's still outstanding on PO X'.",
"inputSchema": {
"type": "object",
"properties": {
"poNumber": {
"type": "string",
"description": "Purchase order number, e.g. MEGCPO9199"
}
},
"required": [
"poNumber"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_purchase_orders",
"description": "List purchase orders, optionally filtered to one site and/or to verified status. Use for 'show me unverified POs', 'what POs are on the Hills'. For the contents of a specific PO use get_purchase_order.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"verified": {
"type": "boolean",
"description": "true for verified only, false for unverified only"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_delivery_note",
"description": "Full detail for ONE delivery note including every item received against it, the purchase order it was matched to, who signed for it, and the OCR confidence and processing status. Use for 'what came in on DN X', 'was delivery note X verified'.",
"inputSchema": {
"type": "object",
"properties": {
"deliveryNoteNumber": {
"type": "string",
"description": "Delivery note number"
}
},
"required": [
"deliveryNoteNumber"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "get_vehicle_fuel_log",
"description": "Fill-up history for ONE vehicle: date, litres, odometer reading, cost, and how each fill compared with the vehicle's configured consumption limit. Use for 'show me the Grader's fuel history', 'why is vehicle X flagged'. Accepts a description, QR code, or id.",
"inputSchema": {
"type": "object",
"properties": {
"vehicle": {
"type": "string",
"description": "Vehicle description, QR code, or record id"
},
"limit": {
"type": "number",
"description": "Most recent N fill-ups, default 20"
}
},
"required": [
"vehicle"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "top_workers",
"description": "Workers ranked by hours worked, with their labour cost. Optionally limited to one site. Use for 'who worked the most hours', 'top 10 workers', 'labour cost by person'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"limit": {
"type": "number",
"description": "How many to return, default 10"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_delivery_notes",
"description": "List delivery notes with their value, matched purchase order, date received and verification status. Sort by value to find the highest or lowest cost note. A note's value is the quantity received times the matched PO item rate; lines never matched to a PO count as zero. Use for 'list delivery notes', 'highest cost delivery note', 'what came in last month'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"verified": {
"type": "boolean",
"description": "true = verified only, false = unverified only"
},
"sortBy": {
"type": "string",
"enum": [
"value",
"dateReceived"
],
"description": "Defaults to dateReceived"
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Defaults to desc"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_plant_hours",
"description": "Plant and equipment hour-meter entries: machine, dates, hours run, budgeted hours, cost per hour, value, and whether the entry went over budget. Use for 'which plant went over budget', 'how many hours did the excavator run', 'most expensive plant this month'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"overBudget": {
"type": "boolean",
"description": "true = over-budget entries only"
},
"sortBy": {
"type": "string",
"enum": [
"value",
"hours",
"startDate"
],
"description": "Defaults to startDate"
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Defaults to desc"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_fixed_costs",
"description": "Individual preliminary-and-general (P&G) overhead entries for a site: description, cost, date and whether it recurs monthly or is a one-off. Use for 'what are my overheads on X', 'biggest fixed cost', 'what one-off costs did we have'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"recurring": {
"type": "boolean",
"description": "true = monthly recurring only, false = one-off only"
},
"sortBy": {
"type": "string",
"enum": [
"cost",
"date"
],
"description": "Defaults to date"
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Defaults to desc"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_income_claims",
"description": "Payment claims raised against a contract: claim number, period, gross amount, who certified it, when it was paid, and whether it is draft, certified or paid. Use for 'what have we claimed', 'which claims are unpaid', 'biggest claim'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"status": {
"type": "string",
"enum": [
"draft",
"certified",
"paid"
],
"description": "Filter to one status"
},
"sortBy": {
"type": "string",
"enum": [
"amount",
"periodEnd"
],
"description": "Defaults to periodEnd"
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Defaults to desc"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_employees",
"description": "The workforce roster: name, employee number, position, hourly rate, standard hours per day, and whether permanent or casual. Includes people with no hours logged, which top_workers does not. Use for 'who works on site X', 'what is someone's rate', 'how many casuals do we have'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"workerType": {
"type": "string",
"enum": [
"permanent",
"casual"
]
},
"sortBy": {
"type": "string",
"enum": [
"name",
"rate"
],
"description": "Defaults to name"
},
"order": {
"type": "string",
"enum": [
"asc",
"desc"
],
"description": "Defaults to asc for name, desc for rate"
},
"limit": {
"type": "number",
"description": "Defaults to 50"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_imports",
"description": "Document import batches — timesheets, fuel logs, purchase orders, delivery notes and plant hours — with their processing status, attempt count and any error. Use for 'what uploads failed', 'did my timesheet import work', 'what is stuck'.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id"
},
"status": {
"type": "string",
"enum": [
"pending",
"processing",
"processed",
"failed",
"dead"
],
"description": "Filter to one status"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "attendance_today",
"description": "Today's attendance from MEGA Clock scans, exactly as the On-site page shows it: who is on site now (and since when), who has clocked out, regulars from the last 7 days who have not arrived, and earlier-day clock-ins with no scan-out (needs attention). Counts plus names. Use for 'who is on site', 'attendance today', 'who hasn't arrived', 'missed scan-outs'. Optionally one site.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id; omit for all sites"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "supplier_balances",
"description": "What is owed to whom: per supplier, value ordered, value delivered and value still outstanding (computed live from PO lines and delivery notes, as on the Suppliers page), plus delivery notes still unresolved against them. Sorted by outstanding, highest first, with totals. Use for 'what do we owe', 'supplier balances', 'how much is outstanding with Afrisam'. Optionally filter by supplier name.",
"inputSchema": {
"type": "object",
"properties": {
"supplier": {
"type": "string",
"description": "Part of a supplier name; omit for all suppliers"
},
"limit": {
"type": "number",
"description": "Defaults to 25"
},
"period": {
"type": "string",
"enum": [
"thisMonth",
"thisWeek",
"month1",
"month2",
"month3"
],
"description": "Only suppliers with goods RECEIVED in this period (by the delivery note's date received), with receivedInPeriod per supplier and in total — what is payable for that period, as on the Suppliers page. thisMonth = the current calendar month; month1/2/3 = one/two/three months back. Use for 'who do I need to pay this month'."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "delivery_note_queue",
"description": "Where delivery-note paperwork stands: the inbox board's counts per column (reading photos, check grouping, identify document and PO, match delivery note to PO, ready to post, failed; completed documents have a separate page) and the work queue of documents that cannot be posted yet — how many lack a supplier, a purchase order or matched lines, grouped by reason, with examples. Use for 'what's in the DN inbox', 'what delivery notes are stuck', 'what needs matching'.",
"inputSchema": {
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "plant_equipment_summary",
"description": "Plant and equipment (hour-meter machines) from fuel logs: per item hours worked (guarded meter diffs — a reset or impossible reading counts as 0 h and is reported as rejected), value at its cost per hour, litres and L/h, with totals and charts. Use for 'how many hours did the plant run', 'what is my plant worth this contract', 'which machine uses the most fuel per hour', 'rejected meter readings', '/plant'. Optionally one site.",
"inputSchema": {
"type": "object",
"properties": {
"site": {
"type": "string",
"description": "Site name, project code, or id; omit for all sites"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "rain_outlook",
"description": "7-day rain forecast per site (Open-Meteo, as on the Overview rain card): rain and chance per day, each day marked dry / watch / likely stop for earthworks, with the count of likely-stop days. Also names sites with no map location. Use for 'will it rain', 'weather this week', 'rain stops', '/today'.",
"inputSchema": {
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}
},
{
"name": "list_change_requests",
"description": "Lists app change requests Ask has filed for the developer (new pages, columns, buttons or report layouts users asked for), optionally filtered by status. Read-only — status is changed from the Change Requests page, not here.",
"inputSchema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"open",
"planned",
"done",
"declined"
]
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
}
]
},
{
"check": "MCP tools/call list_sites",
"passed": true,
"shape": "array",
"rowCount": 3
},
{
"check": "MCP tools/call list_employees",
"passed": true,
"shape": "object",
"keys": [
"scope",
"total",
"showing",
"permanent",
"casual",
"employees"
]
},
{
"check": "MCP tools/call list_purchase_orders",
"passed": true,
"shape": "object",
"keys": [
"scope",
"total",
"showing",
"purchaseOrders"
]
},
{
"check": "MCP tools/call get_pending_verification",
"passed": true,
"shape": "object",
"keys": [
"purchaseOrdersPending",
"deliveryNotesPending",
"purchaseOrders",
"deliveryNotes"
]
},
{
"check": "PocketBase health",
"passed": true,
"status": 200
},
{
"check": "PocketBase authenticated records GET",
"passed": true,
"status": 200
},
{
"check": "http://127.0.0.1:6004: Public app health",
"passed": true,
"route": "/api/health",
"status": 200,
"contentType": "application/json",
"keys": [
"status",
"uptime",
"timestamp"
]
},
{
"check": "http://127.0.0.1:6004: 200 means no login was required; 401 means login is required",
"passed": true,
"route": "/api/dashboard-attention",
"status": 200,
"contentType": "application/json",
"keys": [
"plant",
"financial",
"onSite"
]
},
{
"check": "http://127.0.0.1:6004: Missing ingest secret must be rejected",
"passed": true,
"route": "/api/purchase-orders/by-number/[poNumber]/items",
"status": 401,
"contentType": "application/json",
"keys": [
"error"
],
"error": "unauthorized"
},
{
"check": "http://127.0.0.1:6004: Authenticated read-only PO lookup",
"passed": true,
"route": "/api/purchase-orders/by-number/[poNumber]/items",
"status": 200,
"contentType": "application/json",
"keys": [
"po",
"items"
]
},
{
"check": "http://127.0.0.1:6004: 401/404 is not an MCP handshake; no HTTP MCP route exists in this checkout",
"passed": true,
"route": "/api/mcp",
"status": 404,
"contentType": "text/html; charset=utf-8",
"keys": []
},
{
"check": "https://mega.dash.apphub.co.za: Public app health",
"passed": true,
"route": "/api/health",
"status": 200,
"contentType": "application/json",
"keys": [
"status",
"uptime",
"timestamp"
]
},
{
"check": "https://mega.dash.apphub.co.za: 200 means no login was required; 401 means login is required",
"passed": true,
"route": "/api/dashboard-attention",
"status": 401,
"contentType": "application/json",
"keys": [
"error"
],
"error": "Sign in required"
},
{
"check": "https://mega.dash.apphub.co.za: Missing ingest secret must be rejected",
"passed": true,
"route": "/api/purchase-orders/by-number/[poNumber]/items",
"status": 401,
"contentType": "application/json",
"keys": [
"error"
],
"error": "unauthorized"
},
{
"check": "https://mega.dash.apphub.co.za: Authenticated read-only PO lookup",
"passed": false,
"route": "/api/purchase-orders/by-number/[poNumber]/items",
"status": 401,
"contentType": "application/json",
"keys": [
"error"
],
"error": "unauthorized"
},
{
"check": "https://mega.dash.apphub.co.za: 401/404 is not an MCP handshake; no HTTP MCP route exists in this checkout",
"passed": true,
"route": "/api/mcp",
"status": 401,
"contentType": "application/json",
"keys": [
"error"
],
"error": "Sign in required"
}
],
"summary": {
"passed": 17,
"failed": 1
}
}