{"openapi":"3.1.0","info":{"title":"Wassel API","version":"0.1.0"},"servers":[{"url":"http://api.wassel.cloud"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/v1/tools/bosta/create_delivery":{"post":{"operationId":"bosta_create_delivery","summary":"Create Delivery","description":"Create a Bosta shipment for delivery within Egypt. Returns the tracking number and state. Look up cityCode/zoneCode with bosta_get_cities and bosta_get_zones first. Set cod to the cash-on-delivery amount in EGP, or 0 if prepaid.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","enum":["SEND","CASH_COLLECTION","EXCHANGE","CUSTOMER_RETURN_PICKUP"],"default":"SEND","description":"Delivery type. Default SEND for a normal outbound shipment."},"receiver":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"description":"Recipient first name"},"lastName":{"type":"string","minLength":1,"description":"Recipient last name"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"email":{"type":"string","format":"email","description":"Recipient email, optional"}},"required":["firstName","lastName","phone"],"additionalProperties":false},"dropOffAddress":{"type":"object","properties":{"cityCode":{"type":"string","minLength":1,"description":"City code from bosta_get_cities"},"zoneCode":{"type":"string","minLength":1,"description":"Zone code from bosta_get_zones"},"district":{"type":"string","minLength":1,"description":"District name"},"firstLine":{"type":"string","minLength":1,"description":"Street address line"},"buildingNumber":{"type":"string"}},"required":["cityCode","zoneCode","district","firstLine"],"additionalProperties":false},"cod":{"type":"number","minimum":0,"maximum":50000,"description":"Cash-on-delivery amount in EGP. 0 if prepaid."},"packageDetails":{"type":"object","properties":{"itemsCount":{"type":"integer","exclusiveMinimum":0,"description":"Number of items"},"weight":{"type":"number","exclusiveMinimum":0,"description":"Package weight in kg"},"description":{"type":"string","minLength":1,"description":"What is being shipped"}},"required":["itemsCount","weight","description"],"additionalProperties":false},"notes":{"type":"string","description":"Delivery notes for the courier"},"businessReference":{"type":"string","description":"Your internal order ID, echoed back on the shipment"}},"required":["receiver","dropOffAddress","cod","packageDetails"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/get_delivery":{"post":{"operationId":"bosta_get_delivery","summary":"Get Delivery","description":"Fetch the current status and details of one Bosta shipment by its tracking number.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Bosta tracking number"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/list_deliveries":{"post":{"operationId":"bosta_list_deliveries","summary":"List Deliveries","description":"List Bosta shipments, optionally filtered by state, date range (fromDate/toDate as ISO dates), or your internal businessReference. Paginated.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"state":{"type":"string","description":"Filter by delivery state"},"fromDate":{"type":"string","description":"ISO date, inclusive lower bound on createdAt"},"toDate":{"type":"string","description":"ISO date, inclusive upper bound on createdAt"},"businessReference":{"type":"string","description":"Filter by your internal order ID"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20},"page":{"type":"integer","exclusiveMinimum":0,"default":1}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/cancel_delivery":{"post":{"operationId":"bosta_cancel_delivery","summary":"Cancel Delivery","description":"Cancel a Bosta shipment before it has been picked up. This cannot be undone.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Tracking number of the shipment to cancel before pickup"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/get_cities":{"post":{"operationId":"bosta_get_cities","summary":"Get Cities","description":"List the Egyptian cities Bosta serves. Use a returned city code as cityCode when creating a delivery or looking up zones.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/get_zones":{"post":{"operationId":"bosta_get_zones","summary":"Get Zones","description":"List the delivery zones within a Bosta city. Pass cityCode from bosta_get_cities. Use a returned zone code as zoneCode when creating a delivery.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cityId":{"type":"string","minLength":1,"description":"City id (the `id` from bosta_get_cities)"}},"required":["cityId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/get_pricing":{"post":{"operationId":"bosta_get_pricing","summary":"Get Pricing","description":"Estimate the shipping cost for a Bosta delivery before creating it. Returns shipping cost and any COD fee in EGP.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cityCode":{"type":"string","minLength":1,"description":"Destination city code"},"cod":{"type":"number","minimum":0,"default":0,"description":"Cash-on-delivery amount in EGP"},"weight":{"type":"number","exclusiveMinimum":0,"default":1,"description":"Package weight in kg"},"pickupSectorId":{"type":"string","description":"Bosta pickup sector id; required by Bosta for an accurate quote"}},"required":["cityCode"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/track_delivery":{"post":{"operationId":"bosta_track_delivery","summary":"Track Delivery","description":"Get the full scan history and status timeline of one Bosta shipment by tracking number. Use this (not get_delivery) when the customer asks where their order is or why it is delayed — it returns every state change with timestamps, the hub, and any exception reason, plus Bosta's promised delivery date.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Bosta tracking number to fetch the full scan history for"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/update_delivery":{"post":{"operationId":"bosta_update_delivery","summary":"Update Delivery","description":"Edit an existing Bosta shipment that has NOT been picked up yet. Use this to correct the COD amount (EGP), courier notes, receiver name/phone/email, or package details after the shipment was created. Only the fields you pass are changed. Bosta rejects edits once the parcel is in transit — track_delivery first if unsure.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Tracking number of the shipment to edit (must not be picked up)"},"cod":{"type":"number","minimum":0,"maximum":50000,"description":"New cash-on-delivery amount in EGP"},"notes":{"type":"string","description":"Replace the courier notes"},"receiver":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"description":"Recipient first name"},"lastName":{"type":"string","minLength":1,"description":"Recipient last name"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"email":{"type":"string","format":"email","description":"Recipient email, optional"}},"additionalProperties":false,"description":"Patch receiver fields (name / phone / email)"},"packageDetails":{"type":"object","properties":{"itemsCount":{"type":"integer","exclusiveMinimum":0,"description":"Number of items"},"weight":{"type":"number","exclusiveMinimum":0,"description":"Package weight in kg"},"description":{"type":"string","minLength":1,"description":"What is being shipped"}},"additionalProperties":false,"description":"Patch itemsCount / weight / description"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/search_deliveries":{"post":{"operationId":"bosta_search_deliveries","summary":"Search Deliveries","description":"Search Bosta shipments with rich filters: state, delivery type, createdAt date range (fromDate/toDate ISO dates), your businessReference, a masterAWB group, or an explicit list of trackingNumbers. Paginated (limit max 100, page from 1). Use this over list_deliveries when you need to filter by type, masterAWB, or specific tracking numbers.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"state":{"type":"string","description":"Delivery state to filter by, e.g. \"Delivered\" or \"In Transit\""},"type":{"type":"string","enum":["SEND","CASH_COLLECTION","EXCHANGE","CUSTOMER_RETURN_PICKUP"],"description":"Filter by delivery type"},"fromDate":{"type":"string","description":"ISO date, inclusive lower bound on createdAt"},"toDate":{"type":"string","description":"ISO date, inclusive upper bound on createdAt"},"businessReference":{"type":"string","description":"Filter by your internal order id"},"masterAWB":{"type":"string","description":"Filter to deliveries grouped under one master airwaybill"},"trackingNumbers":{"type":"array","items":{"type":"string"},"description":"Restrict to a specific set of tracking numbers"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20},"page":{"type":"integer","exclusiveMinimum":0,"default":1}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/bulk_create_deliveries":{"post":{"operationId":"bosta_bulk_create_deliveries","summary":"Bulk Create Deliveries","description":"Create up to 50 Bosta shipments in one call. Each item uses the exact same shape as create_delivery (receiver, dropOffAddress with cityCode + district, cod in EGP, packageDetails). City and district ids are resolved internally per shipment. Any row whose city or district cannot be matched is skipped and reported in results with an error, the rest still go through. Use this for batch fulfilment instead of calling create_delivery in a loop.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"deliveries":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["SEND","CASH_COLLECTION","EXCHANGE","CUSTOMER_RETURN_PICKUP"],"default":"SEND","description":"Delivery type. Default SEND for a normal outbound shipment."},"receiver":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"description":"Recipient first name"},"lastName":{"type":"string","minLength":1,"description":"Recipient last name"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"email":{"type":"string","format":"email","description":"Recipient email, optional"}},"required":["firstName","lastName","phone"],"additionalProperties":false},"dropOffAddress":{"type":"object","properties":{"cityCode":{"type":"string","minLength":1,"description":"City code from bosta_get_cities"},"zoneCode":{"type":"string","minLength":1,"description":"Zone code from bosta_get_zones"},"district":{"type":"string","minLength":1,"description":"District name"},"firstLine":{"type":"string","minLength":1,"description":"Street address line"},"buildingNumber":{"type":"string"}},"required":["cityCode","zoneCode","district","firstLine"],"additionalProperties":false},"cod":{"type":"number","minimum":0,"maximum":50000,"description":"Cash-on-delivery amount in EGP. 0 if prepaid."},"packageDetails":{"type":"object","properties":{"itemsCount":{"type":"integer","exclusiveMinimum":0,"description":"Number of items"},"weight":{"type":"number","exclusiveMinimum":0,"description":"Package weight in kg"},"description":{"type":"string","minLength":1,"description":"What is being shipped"}},"required":["itemsCount","weight","description"],"additionalProperties":false},"notes":{"type":"string","description":"Delivery notes for the courier"},"businessReference":{"type":"string","description":"Your internal order ID, echoed back on the shipment"}},"required":["receiver","dropOffAddress","cod","packageDetails"],"additionalProperties":false},"minItems":1,"maxItems":50,"description":"Up to 50 shipments to create in one call. Each item uses the same shape as create_delivery."}},"required":["deliveries"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/print_awb":{"post":{"operationId":"bosta_print_awb","summary":"Print Airwaybill","description":"Get a printable airwaybill (AWB) PDF link for a Bosta shipment by tracking number. Use this to print the shipping label that goes on the parcel before handing it to the courier. Returns a URL to the PDF.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Tracking number to fetch a printable airwaybill PDF for"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/list_pickup_locations":{"post":{"operationId":"bosta_list_pickup_locations","summary":"List Pickup Locations","description":"List the business pickup locations (warehouses / stores) registered on the Bosta account. Use a returned location id as businessLocationId when scheduling a pickup with create_pickup.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/create_pickup":{"post":{"operationId":"bosta_create_pickup","summary":"Create Pickup","description":"Schedule a Bosta courier pickup from one of your locations. Get businessLocationId from list_pickup_locations. scheduledDate is an ISO date (e.g. 2026-05-20); scheduledTimeSlot is one of the two Bosta windows. Use this once shipments are created so the courier collects them.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"businessLocationId":{"type":"string","minLength":1,"description":"Pickup location id from bosta_list_pickup_locations"},"scheduledDate":{"type":"string","minLength":1,"description":"Pickup date, ISO date e.g. 2026-05-20"},"scheduledTimeSlot":{"type":"string","enum":["10:00 to 13:00","13:00 to 16:00"],"default":"10:00 to 13:00","description":"Bosta pickup window"},"contactPersonName":{"type":"string","minLength":1,"description":"Who hands over the parcels"},"contactPersonPhone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Contact phone, 11-digit Egyptian"},"numberOfParcels":{"type":"integer","exclusiveMinimum":0,"description":"Approximate parcel count for this pickup"},"notes":{"type":"string","description":"Notes for the pickup driver"}},"required":["businessLocationId","scheduledDate","contactPersonName","contactPersonPhone"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/list_pickups":{"post":{"operationId":"bosta_list_pickups","summary":"List Pickups","description":"List the scheduled and past Bosta courier pickups on the account, paginated. Use this to check whether a pickup is still scheduled before cancelling it, or to audit pickup history.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20},"page":{"type":"integer","exclusiveMinimum":0,"default":1}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/cancel_pickup":{"post":{"operationId":"bosta_cancel_pickup","summary":"Cancel Pickup","description":"Cancel a scheduled Bosta courier pickup before the driver is dispatched. This cannot be undone. Get the pickupId from list_pickups.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"pickupId":{"type":"string","minLength":1,"description":"Pickup id to cancel; only works before the driver is dispatched"}},"required":["pickupId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/list_transactions":{"post":{"operationId":"bosta_list_transactions","summary":"List Wallet Transactions","description":"List the Bosta business wallet transactions — COD collections, settlements, and fees in EGP — optionally filtered by date range, paginated. Use this to reconcile cash-on-delivery money Bosta owes you against your orders. Returns the current wallet balance when Bosta exposes it.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"fromDate":{"type":"string","description":"ISO date lower bound for the transaction date"},"toDate":{"type":"string","description":"ISO date upper bound for the transaction date"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20},"page":{"type":"integer","exclusiveMinimum":0,"default":1}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/bosta/register_webhook":{"post":{"operationId":"bosta_register_webhook","summary":"Register Delivery Webhook","description":"Register an HTTPS endpoint that Bosta will POST delivery state-change events to (Delivered, Exception, Returned, etc.). Pass the url; optionally restrict to specific event names, otherwise all delivery events are sent. Use this once to wire live shipment-status updates into your system instead of polling.","tags":["bosta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint Bosta will POST delivery state changes to"},"events":{"type":"array","items":{"type":"string"},"description":"Event names to subscribe to; omit for all delivery events. e.g. [\"DELIVERED\",\"EXCEPTION\"]"}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/list_orders":{"post":{"operationId":"salla_list_orders","summary":"List Orders","description":"List Salla store orders, optionally filtered by status slug or order-date range (from_date/to_date as YYYY-MM-DD). Paginated with page and perPage.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by Salla order status slug, e.g. 'under_review', 'completed', 'delivering'."},"from_date":{"type":"string","description":"ISO date (YYYY-MM-DD) inclusive lower bound on order date."},"to_date":{"type":"string","description":"ISO date (YYYY-MM-DD) inclusive upper bound on order date."},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":65,"default":15,"description":"Results per page. Salla caps this at 65; default 15."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/get_order":{"post":{"operationId":"salla_get_order","summary":"Get Order","description":"Fetch one Salla order with its status, totals and customer by Salla order id.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Salla order id to fetch."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/update_order_status":{"post":{"operationId":"salla_update_order_status","summary":"Update Order Status","description":"Change a Salla order's status. Pass the target status slug (e.g. 'completed', 'delivering', 'canceled'). This changes a live order; confirm before running.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Salla order id to update."},"status":{"type":"string","minLength":1,"description":"New status slug, e.g. 'completed', 'delivering', 'canceled'. Use a slug Salla recognizes for the store."},"note":{"type":"string","description":"Optional note attached to the status change."}},"required":["orderId","status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/update_order":{"post":{"operationId":"salla_update_order","summary":"Update Order","description":"Update editable fields on a Salla order such as the internal merchant note or tags. To change the order's fulfilment state use update_order_status instead.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Salla order id to update."},"note":{"type":"string","description":"Internal merchant note attached to the order."},"tags":{"type":"array","items":{"type":"string"},"description":"Tag slugs/ids to set on the order."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/cancel_order":{"post":{"operationId":"salla_cancel_order","summary":"Cancel Order","description":"Cancel a live Salla order. Optionally restore the order's items back to stock (default true). This changes a live order and is hard to reverse; confirm before running.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Salla order id to cancel."},"note":{"type":"string","description":"Optional note explaining the cancellation."},"restore_items":{"type":"boolean","default":true,"description":"Return cancelled order items back to stock. Defaults to true."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/list_products":{"post":{"operationId":"salla_list_products","summary":"List Products","description":"List Salla store products, optionally filtered by keyword or status slug. Paginated with page and perPage.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"keyword":{"type":"string","description":"Free-text search on product name/SKU."},"status":{"type":"string","description":"Filter by product status, e.g. 'sale', 'hidden', 'out'."},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":65,"default":15,"description":"Results per page (Salla cap 65)."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/get_product":{"post":{"operationId":"salla_get_product","summary":"Get Product","description":"Fetch one Salla product with its price, SKU, stock quantity and status by Salla product id.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Salla product id to fetch."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/create_product":{"post":{"operationId":"salla_create_product","summary":"Create Product","description":"Create a new product in the Salla store. Returns the created product id, price and quantity.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Product display name."},"price":{"type":"number","exclusiveMinimum":0,"description":"Selling price in the store's currency."},"product_type":{"type":"string","enum":["product","service","group_products","codes","digital","food"],"default":"product","description":"Salla product type. Default 'product' for a physical good."},"quantity":{"type":"integer","minimum":0,"description":"Initial stock quantity. Omit for unlimited."},"sku":{"type":"string","description":"Optional SKU."},"description":{"type":"string","description":"Optional product description (HTML allowed by Salla)."}},"required":["name","price"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/update_product":{"post":{"operationId":"salla_update_product","summary":"Update Product","description":"Update a Salla product's name, price, quantity, SKU, description, status or category assignment. Only the fields you pass are changed. Use get_product or list_products first to get the product id.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Salla product id to update."},"name":{"type":"string","minLength":1,"description":"New product name."},"price":{"type":"number","exclusiveMinimum":0,"description":"New selling price in the store's currency."},"quantity":{"type":"integer","minimum":0,"description":"New absolute stock quantity."},"sku":{"type":"string","description":"New SKU."},"description":{"type":"string","description":"New product description (HTML allowed by Salla)."},"status":{"type":"string","description":"New product status slug, e.g. 'sale', 'hidden', 'out'."},"categories":{"type":"array","items":{"type":"string"},"description":"Category ids to assign the product to."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/delete_product":{"post":{"operationId":"salla_delete_product","summary":"Delete Product","description":"Permanently delete a product from the Salla store by its id. This cannot be undone; confirm before running.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Salla product id to delete."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/update_inventory":{"post":{"operationId":"salla_update_inventory","summary":"Update Inventory","description":"Set a Salla product's stock quantity to an absolute value (not a delta). Use list_products first to get the product id.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Salla product id whose stock quantity to set."},"quantity":{"type":"integer","minimum":0,"description":"New absolute stock quantity (not a delta)."}},"required":["productId","quantity"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/list_customers":{"post":{"operationId":"salla_list_customers","summary":"List Customers","description":"List Salla store customers, optionally filtered by a keyword on name/email/mobile. Paginated with page and perPage.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"keyword":{"type":"string","description":"Free-text search on customer name/email/mobile."},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":65,"default":15,"description":"Results per page (Salla cap 65)."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/get_customer":{"post":{"operationId":"salla_get_customer","summary":"Get Customer","description":"Fetch one Salla customer with name, email, mobile and city by Salla customer id.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"description":"Salla customer id to fetch."}},"required":["customerId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/create_customer":{"post":{"operationId":"salla_create_customer","summary":"Create Customer","description":"Create a customer in the Salla store. Email and mobile are unique per store. Returns the created customer id and contact details.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"description":"Customer first name."},"last_name":{"type":"string","minLength":1,"description":"Customer last name."},"mobile":{"type":"string","minLength":1,"description":"Customer mobile number without country code."},"mobile_code_country":{"type":"string","default":"+966","description":"Dialing code country, e.g. '+966' for Saudi Arabia."},"email":{"type":"string","format":"email","description":"Customer email. Unique per store if provided."},"gender":{"type":"string","enum":["male","female"],"description":"Customer gender."},"birthday":{"type":"string","description":"Birthday as YYYY-MM-DD."}},"required":["first_name","last_name","mobile"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/list_categories":{"post":{"operationId":"salla_list_categories","summary":"List Categories","description":"List Salla store product categories, optionally filtered by a name keyword or status. Paginated with page and perPage.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"keyword":{"type":"string","description":"Filter categories by a name keyword."},"status":{"type":"string","description":"Filter by category status, e.g. 'active', 'inactive'."},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":65,"default":15,"description":"Results per page (Salla cap 65)."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/get_category":{"post":{"operationId":"salla_get_category","summary":"Get Category","description":"Fetch one Salla product category with its name, parent and status by Salla category id.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"categoryId":{"type":"string","minLength":1,"description":"Salla category id to fetch."}},"required":["categoryId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/register_webhook":{"post":{"operationId":"salla_register_webhook","summary":"Register Webhook","description":"Subscribe an HTTPS endpoint to a Salla store event (e.g. 'order.created', 'order.status.updated', 'product.updated', 'customer.created'). Salla POSTs the event to the url. Pass a secret to have Salla sign the body (X-Salla-Signature, HMAC-SHA256) and store the same value as the connection's webhook_secret so inbound events can be verified.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"event":{"type":"string","minLength":1,"description":"Salla event name to subscribe to, e.g. 'order.created', 'order.status.updated', 'product.updated', 'customer.created'."},"url":{"type":"string","format":"uri","description":"HTTPS endpoint Salla will POST the event to."},"name":{"type":"string","description":"Optional label for the webhook."},"secret":{"type":"string","description":"Shared secret. When set, Salla signs the body (X-Salla-Signature, HMAC-SHA256). Store the same value as credentials.webhook_secret to verify inbound events."}},"required":["event","url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/list_webhooks":{"post":{"operationId":"salla_list_webhooks","summary":"List Webhooks","description":"List the store's active webhook subscriptions (event, destination url, label). Paginated with page.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/salla/delete_webhook":{"post":{"operationId":"salla_delete_webhook","summary":"Delete Webhook","description":"Unsubscribe a Salla webhook so the store stops sending that event to the url. Pass the event name and destination url of the subscription to remove. Confirm before running.","tags":["salla"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"event":{"type":"string","minLength":1,"description":"Event name of the subscription to remove."},"url":{"type":"string","format":"uri","description":"Destination url of the subscription to remove."}},"required":["event","url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/list_orders":{"post":{"operationId":"zid_list_orders","summary":"List Orders","description":"List Zid store orders, optionally filtered by order status code. Paginated with page and per_page.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"order_status":{"type":"string","description":"Filter by Zid order status code: 'new', 'preparing', 'ready', 'indelivery', 'delivered', 'cancelled'."},"payment_method":{"type":"string","description":"Filter by payment method, e.g. 'zid_cod', 'zid_bank_transfer', 'zid_credit_card'."},"payment_status":{"type":"string","enum":["pending","paid","refunded","voided"],"description":"Filter by payment status."},"customer_id":{"type":"string","description":"Filter to one customer's orders by Zid customer id."},"search_term":{"type":"string","description":"Free text: customer phone, email, order code or name."},"date_from":{"type":"string","description":"ISO 8601 lower bound on the date_attribute."},"date_to":{"type":"string","description":"ISO 8601 upper bound on the date_attribute."},"date_attribute":{"type":"string","enum":["created_at","updated_at"],"description":"Which date date_from/date_to filter on. Default created_at."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."},"per_page":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":15,"description":"Results per page. Default 15. Max 100."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/get_order":{"post":{"operationId":"zid_get_order","summary":"Get Order","description":"Fetch one Zid order with its status, totals and customer by Zid order id.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Zid order id to fetch."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/update_order_status":{"post":{"operationId":"zid_update_order_status","summary":"Update Order Status","description":"Change a Zid order's status (new, preparing, ready, indelivery, delivered, cancelled). 'ready' requires inventory_address_id. This changes a live order; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Zid order id to update."},"order_status":{"type":"string","enum":["new","preparing","ready","indelivery","delivered","cancelled"],"description":"Target order status code."},"inventory_address_id":{"type":"string","description":"Required by Zid only when order_status is 'ready'."},"tracking_number":{"type":"string","description":"Optional shipment tracking number."}},"required":["orderId","order_status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/cancel_order":{"post":{"operationId":"zid_cancel_order","summary":"Cancel Order","description":"Cancel a Zid order. Internally moves the order to the 'cancelled' status via change-order-status. This affects a live order; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Zid order id to cancel."},"reason":{"type":"string","description":"Optional cancellation reason recorded on the order."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/list_products":{"post":{"operationId":"zid_list_products","summary":"List Products","description":"List Zid store products with price and stock quantity. Paginated with page and per_page.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."},"per_page":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":15,"description":"Results per page. Default 15."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/get_product":{"post":{"operationId":"zid_get_product","summary":"Get Product","description":"Fetch one Zid product by its id (UUID), including price and stock quantity.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Zid product id (UUID) to fetch."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/create_product":{"post":{"operationId":"zid_create_product","summary":"Create Product","description":"Create a new Zid product. Requires name, price and a unique SKU. Set quantity unless is_infinite is true. Creates a live catalog entry; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Product name shown to customers."},"price":{"type":"number","minimum":0,"description":"Base price in store currency."},"sku":{"type":"string","minLength":1,"description":"Stock keeping unit, unique per store."},"sale_price":{"type":"number","minimum":0,"description":"Discounted price; must be less than price."},"quantity":{"type":"integer","minimum":0,"description":"Stock quantity. Required unless is_infinite is true."},"is_infinite":{"type":"boolean","description":"True for unlimited stock products."},"is_draft":{"type":"boolean","description":"If true, product is saved as a draft and not published."},"requires_shipping":{"type":"boolean","description":"Whether the product needs shipping."},"is_taxable":{"type":"boolean","description":"Whether tax applies to the product."}},"required":["name","price","sku"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/update_product":{"post":{"operationId":"zid_update_product","summary":"Update Product","description":"Update fields on an existing Zid product (name, price, sale_price, description). Zid stores name and description per language; the value you pass is applied to both en and ar. Affects a live product; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Zid product id (UUID) to update."},"name":{"type":"string","description":"New product name (applied to en and ar)."},"price":{"type":"number","minimum":0,"description":"New base price."},"sale_price":{"type":"number","minimum":0,"description":"New discounted price; must be less than price."},"description":{"type":"string","description":"New product description (applied to en and ar)."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/delete_product":{"post":{"operationId":"zid_delete_product","summary":"Delete Product","description":"Permanently delete a Zid product by its id (UUID). Zid returns 204 No Content on success. This is irreversible; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Zid product id (UUID) to delete."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/update_inventory":{"post":{"operationId":"zid_update_inventory","summary":"Update Inventory","description":"Set a Zid product's stock quantity to an absolute value (not a delta). Use list_products first to get the product id.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Zid product id whose stock quantity to set."},"quantity":{"type":"integer","minimum":0,"description":"New absolute stock quantity (not a delta)."}},"required":["productId","quantity"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/update_product_stock":{"post":{"operationId":"zid_update_product_stock","summary":"Update Product Stock","description":"Set a Zid product's available stock at one inventory location. Use this (not update_inventory) for multi-location stores: pass productId, the stock row id, the location UUID and the new available_quantity. Affects live stock; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Zid product id (UUID)."},"stockId":{"type":"string","minLength":1,"description":"Stock row id for the product at this location."},"location":{"type":"string","minLength":1,"description":"Inventory location UUID the quantity applies to."},"available_quantity":{"type":"integer","minimum":0,"description":"New available quantity. Omit when is_infinite is true."},"is_infinite":{"type":"boolean","default":false,"description":"True for unlimited stock at this location."}},"required":["productId","stockId","location"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/list_categories":{"post":{"operationId":"zid_list_categories","summary":"List Categories","description":"List all product categories for the Zid store, including product counts and publish state. Zid returns the full tree in one call (not paginated).","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/get_customer":{"post":{"operationId":"zid_get_customer","summary":"Get Customer","description":"Fetch one Zid customer by id: name, contact, type and order count. Zid exposes per-id lookup only (no list endpoint); get the customer id from an order via list_orders.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"description":"Zid customer id to fetch."}},"required":["customerId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/create_webhook":{"post":{"operationId":"zid_create_webhook","summary":"Create Webhook","description":"Subscribe an HTTPS endpoint to a Zid event (e.g. order.create, order.status.update, product.update, customer.create). Zid does not sign payloads; supply username/password to make Zid send HTTP Basic auth so you can verify the caller.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"event":{"type":"string","minLength":1,"description":"Zid event name, e.g. 'order.create', 'order.status.update', 'product.update', 'customer.create'."},"target_url":{"type":"string","format":"uri","description":"HTTPS endpoint Zid will POST the event to."},"original_id":{"type":"string","minLength":1,"description":"Your app id (or its MD5). Identifies the subscriber."},"username":{"type":"string","description":"Optional Basic-auth username Zid sends on each call."},"password":{"type":"string","description":"Optional Basic-auth password paired with username."}},"required":["event","target_url","original_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/list_webhooks":{"post":{"operationId":"zid_list_webhooks","summary":"List Webhooks","description":"List the webhook subscriptions registered for this Zid store, with their event, target URL and active state.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zid/delete_webhook":{"post":{"operationId":"zid_delete_webhook","summary":"Delete Webhook","description":"Delete ALL webhook subscriptions registered by one subscriber (your app id) for this Zid store. Zid exposes deletion by subscriber, not per webhook id. This stops live event delivery; confirm before running.","tags":["zid"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"subscriber":{"type":"string","minLength":1,"description":"Subscriber id (your app id). Deletes ALL webhooks for it."}},"required":["subscriber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/list_orders":{"post":{"operationId":"shopify_list_orders","summary":"List Orders","description":"List Shopify orders, optionally filtered by status, financial_status or fulfillment_status. Returns up to `limit` orders.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","enum":["open","closed","cancelled","any"],"default":"any","description":"Order status filter. 'any' returns all."},"financial_status":{"type":"string","description":"Filter by financial status, e.g. 'paid', 'pending'."},"fulfillment_status":{"type":"string","description":"Filter by fulfillment status, e.g. 'shipped', 'unfulfilled'."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":250,"default":50,"description":"Page size. Shopify caps this at 250; default 50."},"pageInfo":{"type":"string","description":"Opaque cursor from a previous call's nextPageInfo. When set, Shopify ignores all filters except limit (REST cursor pagination rule)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/get_order":{"post":{"operationId":"shopify_get_order","summary":"Get Order","description":"Fetch one Shopify order with its financial and fulfillment status, total and customer email by order id.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Shopify order id to fetch."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/fulfill_order":{"post":{"operationId":"shopify_fulfill_order","summary":"Fulfill Order","description":"Create a fulfillment for a Shopify order from a given location, optionally with tracking. This notifies the customer by default and cannot be undone; confirm before running.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Shopify order id to fulfill."},"locationId":{"type":"integer","description":"Location id that fulfills the order's line items."},"trackingNumber":{"type":"string","description":"Optional carrier tracking number."},"trackingCompany":{"type":"string","description":"Optional carrier name, e.g. 'Aramex'."},"notifyCustomer":{"type":"boolean","default":true,"description":"Whether Shopify emails the customer about the fulfillment."}},"required":["orderId","locationId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/list_products":{"post":{"operationId":"shopify_list_products","summary":"List Products","description":"List Shopify products with the first variant's price and inventory_item_id (needed for update_inventory). Filter by title or vendor.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"title":{"type":"string","description":"Filter by exact product title."},"vendor":{"type":"string","description":"Filter by vendor."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":250,"default":50,"description":"Page size (Shopify cap 250)."},"pageInfo":{"type":"string","description":"Opaque cursor from a previous call's nextPageInfo. When set, Shopify ignores filters except limit."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/create_product":{"post":{"operationId":"shopify_create_product","summary":"Create Product","description":"Create a Shopify product with a single default variant at the given price.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"Product title."},"price":{"type":"number","exclusiveMinimum":0,"description":"Price for the default variant, in the store currency."},"vendor":{"type":"string","description":"Optional vendor name."},"product_type":{"type":"string","description":"Optional Shopify product type/category label."},"sku":{"type":"string","description":"Optional SKU for the default variant."},"status":{"type":"string","enum":["active","draft"],"default":"active","description":"Initial product status. Default 'active'."}},"required":["title","price"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/update_inventory":{"post":{"operationId":"shopify_update_inventory","summary":"Update Inventory","description":"Set the available stock for a variant at a location to an absolute value. Get inventoryItemId from list_products and the location id from the store. Inventory tracking must be enabled on the variant.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"inventoryItemId":{"type":"integer","description":"The variant's inventory_item_id (from list_products)."},"locationId":{"type":"integer","description":"The location id whose stock level to set."},"available":{"type":"integer","minimum":0,"description":"New absolute available quantity at that location."}},"required":["inventoryItemId","locationId","available"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/list_customers":{"post":{"operationId":"shopify_list_customers","summary":"List Customers","description":"List Shopify store customers with email and lifetime order count.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":250,"default":50,"description":"Page size (Shopify cap 250)."},"pageInfo":{"type":"string","description":"Opaque cursor from a previous call's nextPageInfo. When set, Shopify ignores filters except limit."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/create_discount_code":{"post":{"operationId":"shopify_create_discount_code","summary":"Create Discount Code","description":"Create a Shopify discount code. Shopify models this as a price rule plus a discount code; this tool creates both. For a percentage discount pass valueType 'percentage' and value 20 for 20% off.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"code":{"type":"string","minLength":1,"description":"The discount code customers type at checkout, e.g. 'EID20'."},"title":{"type":"string","minLength":1,"description":"Internal title for the price rule, e.g. 'Eid 2026 20%'."},"valueType":{"type":"string","enum":["percentage","fixed_amount"],"description":"Whether the discount is a percentage or a fixed amount."},"value":{"type":"number","exclusiveMinimum":0,"description":"Discount magnitude. For percentage pass 20 for 20%; Shopify stores it as -20."},"startsAt":{"type":"string","description":"ISO datetime the code becomes active. Defaults to now."},"endsAt":{"type":"string","description":"Optional ISO datetime the code expires."},"usageLimit":{"type":"integer","exclusiveMinimum":0,"description":"Optional total redemption cap across all customers."}},"required":["code","title","valueType","value"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/update_product":{"post":{"operationId":"shopify_update_product","summary":"Update Product","description":"Update an existing Shopify product's title, vendor, type, status or tags. Only the fields you pass are changed (PUT /products/{id}.json).","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Shopify product id to update."},"title":{"type":"string","description":"New product title."},"vendor":{"type":"string","description":"New vendor."},"product_type":{"type":"string","description":"New product type label."},"status":{"type":"string","enum":["active","draft","archived"],"description":"New product status."},"tags":{"type":"string","description":"Comma-separated tags; replaces the existing tag list."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/delete_product":{"post":{"operationId":"shopify_delete_product","summary":"Delete Product","description":"Permanently delete a Shopify product and all its variants (DELETE /products/{id}.json). This cannot be undone; confirm before running.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"Shopify product id to delete."}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/adjust_inventory":{"post":{"operationId":"shopify_adjust_inventory","summary":"Adjust Inventory","description":"Change a variant's available stock at a location by a relative delta, e.g. -2 after a manual sale or +10 on a restock (POST /inventory_levels/adjust.json). Use update_inventory to set an absolute value instead.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"inventoryItemId":{"type":"integer","description":"The variant's inventory_item_id (from list_products)."},"locationId":{"type":"integer","description":"The location id whose stock level to adjust."},"delta":{"type":"integer","description":"Relative change. Positive adds stock, negative removes it. Use update_inventory to set an absolute value instead."}},"required":["inventoryItemId","locationId","delta"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/create_draft_order":{"post":{"operationId":"shopify_create_draft_order","summary":"Create Draft Order","description":"Create a Shopify draft order (an unpaid order/quote) with catalog or custom line items (POST /draft_orders.json). Complete it later with complete_draft_order to turn it into a real order.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"lineItems":{"type":"array","items":{"type":"object","properties":{"variantId":{"type":"integer","description":"Existing variant id. Provide this OR title+price."},"title":{"type":"string","description":"Custom (non-catalog) line item title."},"price":{"type":"number","description":"Custom line item unit price (required with title)."},"quantity":{"type":"integer","exclusiveMinimum":0,"description":"Quantity ordered."}},"required":["quantity"],"additionalProperties":false},"minItems":1,"description":"Line items: either a catalog variantId or a custom title+price."},"customerId":{"type":"integer","description":"Existing Shopify customer id to attach."},"email":{"type":"string","description":"Customer email if no customerId is given."},"note":{"type":"string","description":"Internal note on the draft order."},"useCustomerDefaultAddress":{"type":"boolean","default":false,"description":"Use the attached customer's default address for shipping."}},"required":["lineItems"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/complete_draft_order":{"post":{"operationId":"shopify_complete_draft_order","summary":"Complete Draft Order","description":"Turn a draft order into a real order (PUT /draft_orders/{id}/complete.json). Set paymentPending=false to mark it paid, true to mark it pending. Confirm before running; this creates a real order.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"draftOrderId":{"type":"string","minLength":1,"description":"Draft order id to complete."},"paymentPending":{"type":"boolean","default":false,"description":"true marks the resulting order as payment pending; false marks it paid."}},"required":["draftOrderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/cancel_order":{"post":{"operationId":"shopify_cancel_order","summary":"Cancel Order","description":"Cancel a Shopify order (POST /orders/{id}/cancel.json), optionally refunding and emailing the customer. This cannot be undone; confirm before running.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Shopify order id to cancel."},"reason":{"type":"string","enum":["customer","fraud","inventory","declined","other"],"default":"other","description":"Cancellation reason recorded on the order."},"refund":{"type":"boolean","default":false,"description":"Whether Shopify should refund the order's transactions."},"email":{"type":"boolean","default":false,"description":"Whether to email the customer about the cancellation."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/refund_order":{"post":{"operationId":"shopify_refund_order","summary":"Refund Order","description":"Refund line items and/or shipping on a Shopify order. Follows Shopify's documented flow: POST /orders/{id}/refunds/calculate.json to get suggested transactions, then POST /orders/{id}/refunds.json. This moves money and cannot be undone; confirm before running.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Shopify order id to refund."},"lineItems":{"type":"array","items":{"type":"object","properties":{"lineItemId":{"type":"integer","description":"Order line item id to refund."},"quantity":{"type":"integer","exclusiveMinimum":0,"description":"Quantity to refund."},"restockType":{"type":"string","enum":["no_restock","cancel","return","legacy_restock"],"default":"return","description":"How Shopify restocks the returned items."}},"required":["lineItemId","quantity"],"additionalProperties":false},"description":"Specific line items to refund. Omit for a shipping-only or amount-only refund."},"refundShipping":{"type":"boolean","default":false,"description":"Refund the full remaining shipping amount."},"note":{"type":"string","description":"Reason note shown on the refund."},"notify":{"type":"boolean","default":false,"description":"Email the customer about the refund."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/list_order_transactions":{"post":{"operationId":"shopify_list_order_transactions","summary":"List Order Transactions","description":"List the payment transactions (sale, capture, refund, etc.) on a Shopify order (GET /orders/{id}/transactions.json). Use this to reconcile what was actually paid or refunded.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Shopify order id to read payments for."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/create_customer":{"post":{"operationId":"shopify_create_customer","summary":"Create Customer","description":"Create a Shopify customer record with email, name, phone and tags (POST /customers.json). Email must be unique in the store.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Customer email (must be unique)."},"firstName":{"type":"string","description":"First name."},"lastName":{"type":"string","description":"Last name."},"phone":{"type":"string","description":"Phone in E.164 format, e.g. '+201001234567'."},"tags":{"type":"string","description":"Comma-separated tags."},"note":{"type":"string","description":"Internal note about the customer."}},"required":["email"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/update_customer":{"post":{"operationId":"shopify_update_customer","summary":"Update Customer","description":"Update a Shopify customer's email, name, phone, tags or note (PUT /customers/{id}.json). Only the fields you pass are changed.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"description":"Shopify customer id to update."},"email":{"type":"string","format":"email","description":"New email."},"firstName":{"type":"string","description":"New first name."},"lastName":{"type":"string","description":"New last name."},"phone":{"type":"string","description":"New phone in E.164 format."},"tags":{"type":"string","description":"Comma-separated tags; replaces the existing list."},"note":{"type":"string","description":"Internal note."}},"required":["customerId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/delete_customer":{"post":{"operationId":"shopify_delete_customer","summary":"Delete Customer","description":"Permanently delete a Shopify customer record (DELETE /customers/{id}.json). Customers with existing orders cannot be deleted by Shopify. This cannot be undone; confirm before running.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"description":"Shopify customer id to delete."}},"required":["customerId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/search_customers":{"post":{"operationId":"shopify_search_customers","summary":"Search Customers","description":"Find Shopify customers by Shopify's search query syntax, e.g. 'email:bob@x.com', 'tag:vip', or a name (GET /customers/search.json).","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Shopify customer search query, e.g. 'email:bob@x.com' or 'tag:vip' or a name."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":250,"default":50,"description":"Page size (Shopify cap 250)."}},"required":["query"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/create_collection":{"post":{"operationId":"shopify_create_collection","summary":"Create Collection","description":"Create a Shopify custom collection (manual product grouping) and optionally attach products (POST /custom_collections.json, then POST /collects.json per product).","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"Collection title."},"bodyHtml":{"type":"string","description":"Collection description (HTML allowed)."},"published":{"type":"boolean","default":true,"description":"Whether the collection is visible on the storefront."},"productIds":{"type":"array","items":{"type":"integer"},"description":"Optional product ids to add to the new collection."}},"required":["title"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/add_product_to_collection":{"post":{"operationId":"shopify_add_product_to_collection","summary":"Add Product To Collection","description":"Add an existing product to an existing custom collection by creating a collect join (POST /collects.json).","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"collectionId":{"type":"integer","description":"Custom collection id (from create_collection)."},"productId":{"type":"integer","description":"Product id to add to the collection."}},"required":["collectionId","productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/register_webhook":{"post":{"operationId":"shopify_register_webhook","summary":"Register Webhook","description":"Subscribe an HTTPS endpoint to a Shopify event such as orders/create or fulfillments/create (POST /webhooks.json). Shopify signs each delivery; use parse_webhook to verify and read it.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"topic":{"type":"string","enum":["orders/create","orders/updated","orders/paid","orders/cancelled","orders/fulfilled","fulfillments/create","fulfillments/update","products/create","products/update","customers/create","customers/update","refunds/create"],"description":"The Shopify event to subscribe to."},"address":{"type":"string","format":"uri","description":"HTTPS endpoint Shopify POSTs the payload to."},"format":{"type":"string","enum":["json","xml"],"default":"json","description":"Payload format. Default json."}},"required":["topic","address"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/list_webhooks":{"post":{"operationId":"shopify_list_webhooks","summary":"List Webhooks","description":"List the store's registered webhook subscriptions, optionally filtered by topic (GET /webhooks.json).","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"topic":{"type":"string","enum":["orders/create","orders/updated","orders/paid","orders/cancelled","orders/fulfilled","fulfillments/create","fulfillments/update","products/create","products/update","customers/create","customers/update","refunds/create"],"description":"Optional filter to one topic."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":250,"default":50,"description":"Page size (Shopify cap 250)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/delete_webhook":{"post":{"operationId":"shopify_delete_webhook","summary":"Delete Webhook","description":"Delete a Shopify webhook subscription so the store stops POSTing that event (DELETE /webhooks/{id}.json).","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1,"description":"Webhook subscription id to delete."}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shopify/parse_webhook":{"post":{"operationId":"shopify_parse_webhook","summary":"Parse Webhook","description":"Verify and parse an inbound Shopify webhook. Pass the raw request body, the X-Shopify-Hmac-Sha256 header, the X-Shopify-Topic header and your app API secret. Returns whether the signature is authentic plus a summary of the event.","tags":["shopify"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"rawBody":{"type":"string","minLength":1,"description":"The exact raw request body bytes Shopify POSTed (unparsed)."},"hmacHeader":{"type":"string","minLength":1,"description":"Value of the X-Shopify-Hmac-Sha256 request header."},"topicHeader":{"type":"string","description":"Value of the X-Shopify-Topic request header, e.g. 'orders/create'."},"apiSecret":{"type":"string","minLength":1,"description":"The app's API secret / client secret used to compute the HMAC. Required to verify authenticity."}},"required":["rawBody","hmacHeader","apiSecret"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/create_shipment":{"post":{"operationId":"shipblu_create_shipment","summary":"Create Shipment","description":"Create a ShipBlu COD delivery within Egypt. Returns the tracking number (AWB) and status. Set cod to the cash-on-delivery amount in EGP, or 0 if prepaid.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"description":"Recipient full name as on the AWB"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"email":{"type":"string","format":"email","description":"Recipient email, optional"}},"required":["fullName","phone"],"additionalProperties":false},"dropOffAddress":{"type":"object","properties":{"governorate":{"type":"string","minLength":1,"description":"Governorate name, e.g. Cairo"},"city":{"type":"string","minLength":1,"description":"City name within the governorate"},"zone":{"type":"string","description":"Delivery zone, optional"},"line1":{"type":"string","minLength":1,"description":"Street and building address"}},"required":["governorate","city","line1"],"additionalProperties":false},"cod":{"type":"number","minimum":0,"maximum":50000,"description":"Cash-on-delivery amount in EGP. 0 if prepaid."},"packageCount":{"type":"integer","exclusiveMinimum":0,"maximum":4,"default":1,"description":"Number of packages, max 4 per ShipBlu order"},"packageSize":{"type":"string","enum":["S","M","L","XL"],"default":"S","description":"Package size bucket: S, M, L, or XL"},"description":{"type":"string","minLength":1,"description":"What is being shipped"},"merchantReference":{"type":"string","description":"Your internal order ID, echoed back on the shipment"}},"required":["customer","dropOffAddress","cod","description"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/track_shipment":{"post":{"operationId":"shipblu_track_shipment","summary":"Track Shipment","description":"Fetch the current status and full status history of one ShipBlu shipment by its tracking number (AWB).","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"ShipBlu tracking number / AWB"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/list_shipments":{"post":{"operationId":"shipblu_list_shipments","summary":"List Shipments","description":"List ShipBlu shipments, optionally filtered by status or a free-text search (tracking number or merchant reference). Paginated with limit/offset.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by shipment status"},"search":{"type":"string","description":"Free-text search (tracking number or merchant reference)"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"offset":{"type":"integer","minimum":0,"default":0,"description":"Zero-based offset for pagination"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/cancel_shipment":{"post":{"operationId":"shipblu_cancel_shipment","summary":"Cancel Shipment","description":"Cancel a ShipBlu shipment before it has been picked up. This cannot be undone.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Tracking number of the shipment to cancel before pickup"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/get_rates":{"post":{"operationId":"shipblu_get_rates","summary":"Get Rates","description":"Estimate the ShipBlu shipping cost for a delivery before creating it. Returns shipping cost and any COD fee in EGP.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"governorate":{"type":"string","minLength":1,"description":"Destination governorate"},"cod":{"type":"number","minimum":0,"default":0,"description":"Cash-on-delivery amount in EGP for the fee estimate"},"packageSize":{"type":"string","enum":["S","M","L","XL"],"default":"S","description":"Package size bucket: S, M, L, or XL"}},"required":["governorate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/get_shipment":{"post":{"operationId":"shipblu_get_shipment","summary":"Get Shipment","description":"Fetch one ShipBlu delivery order by its numeric id (returned by create_shipment / list_shipments). Use track_shipment instead when you only have a tracking number and want the status history.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu delivery-order numeric id (from create/list)"}},"required":["id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/create_order":{"post":{"operationId":"shipblu_create_order","summary":"Create Delivery Order","description":"Create a ShipBlu delivery order using the real /delivery-orders/ API: a customer with a numeric zone id (from get_zones) and an array of packages. This is the production-correct alternative to create_shipment. Set cashAmount to the COD amount in EGP, 0 if prepaid.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"description":"Recipient full name as on the AWB"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"secondaryPhone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Optional second contact number"},"email":{"type":"string","format":"email","description":"Recipient email, optional"},"line1":{"type":"string","minLength":1,"description":"Street and building address"},"line2":{"type":"string","description":"Apartment / floor / landmark"},"zone":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu zone id from get_zones (cities/{id}/zones/)"}},"required":["fullName","phone","line1","zone"],"additionalProperties":false},"packages":{"type":"array","items":{"type":"object","properties":{"packageSize":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu numeric package-size id (1 = smallest)"},"description":{"type":"string","description":"What is inside this package"},"fragile":{"type":"boolean","description":"Mark the package as fragile"}},"required":["packageSize"],"additionalProperties":false},"minItems":1,"description":"One entry per package in the shipment"},"cashAmount":{"type":"number","minimum":0,"description":"Cash-on-delivery amount in EGP. 0 if prepaid."},"merchantOrderReference":{"type":"string","description":"Your internal order id, echoed back on the order"}},"required":["customer","packages","cashAmount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/bulk_create_orders":{"post":{"operationId":"shipblu_bulk_create_orders","summary":"Bulk Create Delivery Orders","description":"Create up to 50 ShipBlu delivery orders in one call. Each row uses the same shape as create_order. ShipBlu has no native bulk endpoint, so rows are POSTed one by one; a row that ShipBlu rejects is reported in results with its error and the rest still go through. Use this for batch fulfilment instead of looping create_order yourself.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orders":{"type":"array","items":{"type":"object","properties":{"customer":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"description":"Recipient full name as on the AWB"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"secondaryPhone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Optional second contact number"},"email":{"type":"string","format":"email","description":"Recipient email, optional"},"line1":{"type":"string","minLength":1,"description":"Street and building address"},"line2":{"type":"string","description":"Apartment / floor / landmark"},"zone":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu zone id from get_zones (cities/{id}/zones/)"}},"required":["fullName","phone","line1","zone"],"additionalProperties":false},"packages":{"type":"array","items":{"type":"object","properties":{"packageSize":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu numeric package-size id (1 = smallest)"},"description":{"type":"string","description":"What is inside this package"},"fragile":{"type":"boolean","description":"Mark the package as fragile"}},"required":["packageSize"],"additionalProperties":false},"minItems":1,"description":"One entry per package in the shipment"},"cashAmount":{"type":"number","minimum":0,"description":"Cash-on-delivery amount in EGP. 0 if prepaid."},"merchantOrderReference":{"type":"string","description":"Your internal order id, echoed back on the order"}},"required":["customer","packages","cashAmount"],"additionalProperties":false},"minItems":1,"maxItems":50,"description":"Up to 50 delivery orders; same shape as create_shipment"}},"required":["orders"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/update_shipment":{"post":{"operationId":"shipblu_update_shipment","summary":"Update Shipment","description":"PATCH an existing ShipBlu delivery order before it is picked up — correct the COD amount, the recipient name/phone, the address line, the zone, or your merchant reference. Only the fields you pass are changed.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu delivery-order id to update"},"cashAmount":{"type":"number","minimum":0,"description":"New cash-on-delivery amount in EGP"},"merchantOrderReference":{"type":"string","description":"New internal order reference"},"customerFullName":{"type":"string","minLength":1,"description":"Corrected recipient name"},"customerPhone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Corrected recipient phone"},"line1":{"type":"string","minLength":1,"description":"Corrected street address"},"zone":{"type":"integer","exclusiveMinimum":0,"description":"Corrected ShipBlu zone id"}},"required":["id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/request_pickup":{"post":{"operationId":"shipblu_request_pickup","summary":"Request Pickup","description":"Tell ShipBlu to collect orders that are still in CREATED status by moving them to PICKUP_REQUESTED. Pass the tracking numbers of the orders you want couriered. Call this after create_order/create_shipment so the courier actually comes for the parcels.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumbers":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"Tracking numbers to move from CREATED to PICKUP_REQUESTED so ShipBlu collects them"}},"required":["trackingNumbers"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/print_label":{"post":{"operationId":"shipblu_print_label","summary":"Print Shipping Label","description":"Get the printable ShipBlu shipping label(s) / AWB for one or more tracking numbers. format 'pdf' returns the PDF (URL or string); 'html' returns an injectable div you can merge with your own pick-and-pack label. Print this before handing parcels to the courier.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumbers":{"type":"array","items":{"type":"string","minLength":1},"minItems":1,"description":"One or more tracking numbers to print labels for"},"format":{"type":"string","enum":["pdf","html"],"default":"pdf","description":"pdf returns a URL/string, html returns an injectable div"},"onePerPage":{"type":"boolean","default":false,"description":"PDF only: one label per A4 page instead of two"}},"required":["trackingNumbers"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/get_governorates":{"post":{"operationId":"shipblu_get_governorates","summary":"Get Governorates","description":"List the Egyptian governorates ShipBlu serves. Use a returned governorate id with get_cities, then get_zones, to resolve the numeric zone id that create_order needs.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/get_cities":{"post":{"operationId":"shipblu_get_cities","summary":"Get Cities","description":"List the cities ShipBlu serves under a governorate. Pass governorateId from get_governorates. Use a returned city id with get_zones.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"governorateId":{"type":"integer","exclusiveMinimum":0,"description":"Governorate id from get_governorates"}},"required":["governorateId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/get_zones":{"post":{"operationId":"shipblu_get_zones","summary":"Get Zones","description":"List the delivery zones inside a ShipBlu city. Pass cityId from get_cities. The returned zone id is what create_order expects as customer.zone.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cityId":{"type":"integer","exclusiveMinimum":0,"description":"City id from get_cities"}},"required":["cityId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/create_cash_collection":{"post":{"operationId":"shipblu_create_cash_collection","summary":"Create Cash Collection","description":"Create a ShipBlu cash-collection order: send a courier to collect a sum of money in EGP from a customer (no parcel delivered). Use this for refunds owed to you or money pickups, not for a normal COD delivery.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"description":"Recipient full name as on the AWB"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"secondaryPhone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Optional second contact number"},"email":{"type":"string","format":"email","description":"Recipient email, optional"},"line1":{"type":"string","minLength":1,"description":"Street and building address"},"line2":{"type":"string","description":"Apartment / floor / landmark"},"zone":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu zone id from get_zones (cities/{id}/zones/)"}},"required":["fullName","phone","line1","zone"],"additionalProperties":false},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount in EGP ShipBlu should collect from the customer"}},"required":["customer","amount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/list_cash_collections":{"post":{"operationId":"shipblu_list_cash_collections","summary":"List Cash Collections","description":"List ShipBlu cash-collection orders, paginated with limit/offset. Use this to reconcile money ShipBlu collected on your behalf against your records.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"offset":{"type":"integer","minimum":0,"default":0,"description":"Zero-based offset for DRF pagination"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/create_return":{"post":{"operationId":"shipblu_create_return","summary":"Create Return","description":"Create a ShipBlu return order: a courier collects package(s) back from the customer and brings them to you. Same customer/packages shape as create_order. cashAmount is any refund to hand the customer on collection, 0 if none.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"description":"Recipient full name as on the AWB"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"secondaryPhone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Optional second contact number"},"email":{"type":"string","format":"email","description":"Recipient email, optional"},"line1":{"type":"string","minLength":1,"description":"Street and building address"},"line2":{"type":"string","description":"Apartment / floor / landmark"},"zone":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu zone id from get_zones (cities/{id}/zones/)"}},"required":["fullName","phone","line1","zone"],"additionalProperties":false},"packages":{"type":"array","items":{"type":"object","properties":{"packageSize":{"type":"integer","exclusiveMinimum":0,"description":"ShipBlu numeric package-size id (1 = smallest)"},"description":{"type":"string","description":"What is inside this package"},"fragile":{"type":"boolean","description":"Mark the package as fragile"}},"required":["packageSize"],"additionalProperties":false},"minItems":1,"description":"Packages to collect back from the customer"},"cashAmount":{"type":"number","minimum":0,"default":0,"description":"Refund to hand the customer on return, 0 if none"},"merchantOrderReference":{"type":"string","description":"Your internal reference for the return"}},"required":["customer","packages"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/list_pickup_points":{"post":{"operationId":"shipblu_list_pickup_points","summary":"List Pickup Points","description":"List the merchant pickup points configured on the ShipBlu account — the locations a courier collects parcels from. Useful before scheduling pickups so you know which points exist.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/shipblu/register_webhook":{"post":{"operationId":"shipblu_register_webhook","summary":"Register Status Webhook","description":"Register an HTTPS endpoint that ShipBlu will POST order status changes to (DELIVERED, RETURNED, OUT_FOR_DELIVERY, etc.) instead of polling. MODELLED: ShipBlu's public docs do not document a webhook API, so confirm with ShipBlu support before relying on this in production.","tags":["shipblu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint ShipBlu should POST status changes to"},"events":{"type":"array","items":{"type":"string","minLength":1},"description":"Optional status filter, e.g. ['DELIVERED','RETURNED']"}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/create_invoice":{"post":{"operationId":"fawaterak_create_invoice","summary":"Create Invoice","description":"Create a Fawaterak invoice with a hosted payment link. Returns the invoiceId, invoiceKey, and the customer-facing payment URL. Optionally email or SMS the link on creation.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cartTotal":{"type":"number","exclusiveMinimum":0,"description":"Invoice total amount in the chosen currency"},"currency":{"type":"string","enum":["EGP","USD","SR","AED","KWD","QAR","BHD"],"default":"EGP","description":"ISO currency code for the invoice"},"customer":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"description":"Customer first name (required)"},"lastName":{"type":"string","minLength":1,"description":"Customer last name (required)"},"email":{"type":"string","format":"email","description":"Customer email, optional"},"phone":{"type":"string","description":"Customer phone, optional"},"address":{"type":"string","description":"Customer address, optional"}},"required":["firstName","lastName"],"additionalProperties":false},"cartItems":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Line item name"},"price":{"type":"number","exclusiveMinimum":0,"description":"Unit price in the invoice currency"},"quantity":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Quantity of this line item"}},"required":["name","price"],"additionalProperties":false},"minItems":1,"description":"Line items billed on this invoice"},"sendEmail":{"type":"boolean","default":false,"description":"Email the payment link to the customer on creation"},"sendSMS":{"type":"boolean","default":false,"description":"SMS the payment link to the customer on creation"},"dueDate":{"type":"string","description":"ISO date the invoice is due, optional"},"payLoad":{"type":"string","description":"Opaque string echoed back in webhooks (your order id)"}},"required":["cartTotal","customer","cartItems"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/get_invoice":{"post":{"operationId":"fawaterak_get_invoice","summary":"Get Invoice","description":"Fetch the current status and paid amount of one Fawaterak invoice by its invoiceKey.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoiceKey":{"type":"string","minLength":1,"description":"The invoiceKey returned by create_invoice"}},"required":["invoiceKey"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/list_invoices":{"post":{"operationId":"fawaterak_list_invoices","summary":"List Invoices","description":"List Fawaterak invoices, optionally filtered by status or a created-at date range. Paginated by page number.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by invoice status"},"fromDate":{"type":"string","description":"ISO date, inclusive lower bound on createdAt"},"toDate":{"type":"string","description":"ISO date, inclusive upper bound on createdAt"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/cancel_invoice":{"post":{"operationId":"fawaterak_cancel_invoice","summary":"Cancel Invoice","description":"Cancel a Fawaterak invoice before it is paid. This cannot be undone.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoiceId":{"type":"string","minLength":1,"description":"Numeric Fawaterak invoice id to cancel before it is paid"}},"required":["invoiceId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/send_invoice":{"post":{"operationId":"fawaterak_send_invoice","summary":"Send Invoice","description":"(Re)send an existing Fawaterak invoice payment link to the customer by email, SMS, or both.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoiceKey":{"type":"string","minLength":1,"description":"The invoiceKey of the invoice to (re)send"},"channel":{"type":"string","enum":["email","sms","both"],"default":"email","description":"Delivery channel for the payment link"}},"required":["invoiceKey"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/get_payment_methods":{"post":{"operationId":"fawaterak_get_payment_methods","summary":"Get Payment Methods","description":"List the payment methods enabled on this Fawaterak portal account (card, Fawry, wallet, etc.). Returns each method's paymentId — pass it to execute_payment to launch a transaction on that method. Read-only.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/execute_payment":{"post":{"operationId":"fawaterak_execute_payment","summary":"Execute Payment","description":"Launch a payment transaction on a specific Fawaterak payment method (Gateway Step 2). Call get_payment_methods first to get the paymentMethodId. Returns the redirect/payment URL for card/wallet, or a reference number for Fawry/Aman/Masary cash payments.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentMethodId":{"type":"string","minLength":1,"description":"PaymentMethodId from get_payment_methods"},"cartTotal":{"type":"number","exclusiveMinimum":0,"description":"Invoice total amount in the chosen currency"},"currency":{"type":"string","enum":["EGP","USD","SR","AED","KWD","QAR","BHD"],"default":"EGP","description":"ISO currency code for the payment"},"customer":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"description":"Customer first name (required)"},"lastName":{"type":"string","minLength":1,"description":"Customer last name (required)"},"email":{"type":"string","format":"email","description":"Customer email, optional"},"phone":{"type":"string","description":"Customer phone, optional"},"address":{"type":"string","description":"Customer address, optional"}},"required":["firstName","lastName"],"additionalProperties":false},"cartItems":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Line item name"},"price":{"type":"number","exclusiveMinimum":0,"description":"Unit price in the invoice currency"},"quantity":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Quantity of this line item"}},"required":["name","price"],"additionalProperties":false},"minItems":1,"description":"Line items billed on this payment"},"payLoad":{"type":"string","description":"Opaque string echoed back in webhooks (your order id)"}},"required":["paymentMethodId","cartTotal","customer","cartItems"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/refund_invoice":{"post":{"operationId":"fawaterak_refund_invoice","summary":"Refund Invoice","description":"Refund a paid Fawaterak invoice, fully or partially (omit amount for a full refund). This returns real money to the customer and cannot be undone — always confirm first.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoiceId":{"type":"string","minLength":1,"description":"Numeric Fawaterak invoice id to refund"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Partial refund amount; omit to refund the full invoice"},"reason":{"type":"string","description":"Reason for the refund, stored on the transaction"}},"required":["invoiceId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/search_invoices":{"post":{"operationId":"fawaterak_search_invoices","summary":"Search Invoices","description":"Search Fawaterak invoices by customer text, your order reference (payLoad), status, or a created-at date range. Paginated by page number. Use list_invoices for a plain status/date listing.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"query":{"type":"string","description":"Free-text match on customer name / email / phone"},"reference":{"type":"string","description":"Match on your payLoad / order reference"},"status":{"type":"string","description":"Filter by invoice status"},"fromDate":{"type":"string","description":"ISO date, inclusive lower bound on createdAt"},"toDate":{"type":"string","description":"ISO date, inclusive upper bound on createdAt"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fawaterak/verify_webhook":{"post":{"operationId":"fawaterak_verify_webhook","summary":"Verify Webhook","description":"Verify a Fawaterak webhook callback's hashKey (HMAC-SHA256 over the documented field string, keyed with your Fawaterak vendor_key) and parse it into a typed event (paid / failed / expired / refund). Use this before trusting any Fawaterak webhook. Purely local — no network, no money movement.","tags":["fawaterak"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":{},"description":"The parsed JSON body Fawaterak POSTed to your webhook URL"}},"required":["payload"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/woocommerce/list_orders":{"post":{"operationId":"woocommerce_list_orders","summary":"List Orders","description":"List WooCommerce orders, optionally filtered by status, free-text search, or an 'after' ISO date. Paginated with page/perPage.","tags":["woocommerce"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by status, e.g. processing, completed, cancelled, any"},"search":{"type":"string","description":"Free-text order search"},"after":{"type":"string","description":"ISO8601 date — only orders created after this"},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/woocommerce/get_order":{"post":{"operationId":"woocommerce_get_order","summary":"Get Order","description":"Fetch one WooCommerce order by its numeric id, including status, total, currency, and billing email.","tags":["woocommerce"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"integer","exclusiveMinimum":0,"description":"WooCommerce order id"}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/woocommerce/update_order_status":{"post":{"operationId":"woocommerce_update_order_status","summary":"Update Order Status","description":"Change a WooCommerce order's status (e.g. to processing, completed, cancelled, or refunded). Returns the updated order.","tags":["woocommerce"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"integer","exclusiveMinimum":0,"description":"WooCommerce order id"},"status":{"type":"string","enum":["pending","processing","on-hold","completed","cancelled","refunded","failed"],"description":"New WooCommerce order status"}},"required":["orderId","status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/woocommerce/list_products":{"post":{"operationId":"woocommerce_list_products","summary":"List Products","description":"List WooCommerce products, optionally filtered by free-text search, exact SKU, or status. Paginated with page/perPage.","tags":["woocommerce"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"search":{"type":"string","description":"Free-text product search"},"sku":{"type":"string","description":"Exact SKU filter"},"status":{"type":"string","description":"publish, draft, pending, private"},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/woocommerce/update_product":{"post":{"operationId":"woocommerce_update_product","summary":"Update Product","description":"Update a WooCommerce product's price, tracked stock quantity, or status. Only the fields you pass are changed. Returns the updated product.","tags":["woocommerce"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"integer","exclusiveMinimum":0,"description":"WooCommerce product id"},"regularPrice":{"type":"string","description":"New regular price as a string, e.g. \"199.00\""},"stockQuantity":{"type":"integer","description":"New tracked stock quantity"},"status":{"type":"string","enum":["publish","draft","pending","private"],"description":"New product status"}},"required":["productId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/woocommerce/list_customers":{"post":{"operationId":"woocommerce_list_customers","summary":"List Customers","description":"List WooCommerce customers, optionally filtered by free-text search or an exact email. Paginated with page/perPage.","tags":["woocommerce"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"search":{"type":"string","description":"Free-text search (name or email)"},"email":{"type":"string","format":"email","description":"Exact email filter"},"perPage":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/create_session":{"post":{"operationId":"tabby_create_session","summary":"Create Checkout Session","description":"Create a Tabby BNPL checkout session for an order. Returns the session id, status, and (when available) a hosted checkout URL to redirect the buyer to. merchant_code comes from the stored credentials.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"Order amount as a decimal string, e.g. \"320.00\""},"currency":{"type":"string","enum":["AED","SAR","KWD","BHD","QAR"],"description":"ISO currency, must match the merchant market"},"description":{"type":"string","minLength":1,"description":"Short order description shown to the buyer"},"buyer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Buyer full name"},"email":{"type":"string","format":"email","description":"Buyer email"},"phone":{"type":"string","minLength":1,"description":"Buyer phone in international format"}},"required":["name","email","phone"],"additionalProperties":false},"orderReference":{"type":"string","minLength":1,"description":"Your internal order/cart id, echoed back on the payment"},"lang":{"type":"string","enum":["ar","en"],"default":"en","description":"Checkout language: ar or en"},"successUrl":{"type":"string","format":"uri","description":"Where Tabby redirects the buyer after approval"},"cancelUrl":{"type":"string","format":"uri","description":"Where Tabby redirects the buyer on cancel"},"failureUrl":{"type":"string","format":"uri","description":"Where Tabby redirects the buyer on failure"}},"required":["amount","currency","description","buyer","orderReference","successUrl","cancelUrl","failureUrl"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/get_session":{"post":{"operationId":"tabby_get_session","summary":"Get Checkout Session","description":"Retrieve an existing Tabby checkout session by its id. Returns the session status, the associated payment id, the tokenized-payment token (only present once the session is approved), and a hosted checkout URL when still available. Read-only.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"description":"Tabby checkout session id (UUID) returned by create_session"}},"required":["sessionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/get_payment":{"post":{"operationId":"tabby_get_payment","summary":"Get Payment","description":"Fetch the current status and amount of one Tabby payment by its payment id.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentId":{"type":"string","minLength":1,"description":"Tabby payment id (UUID)"}},"required":["paymentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/update_payment":{"post":{"operationId":"tabby_update_payment","summary":"Update Payment Reference","description":"Update the merchant order reference (order.reference_id) on an existing Tabby payment. This is the only field Tabby lets you update; the payment must be AUTHORIZED or CLOSED. Other fields are ignored by Tabby.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentId":{"type":"string","minLength":1,"description":"Tabby payment id to update"},"orderReference":{"type":"string","minLength":1,"description":"New merchant order/cart id (order.reference_id). Only this field is updatable; payment must be AUTHORIZED or CLOSED"}},"required":["paymentId","orderReference"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/capture_payment":{"post":{"operationId":"tabby_capture_payment","summary":"Capture Payment","description":"Capture funds on an authorized Tabby payment (manual-capture flow). Returns the capture id and the resulting payment status.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentId":{"type":"string","minLength":1,"description":"Tabby payment id to capture"},"amount":{"type":"string","minLength":1,"description":"Amount to capture as a decimal string, e.g. \"320.00\""},"referenceId":{"type":"string","minLength":1,"description":"Idempotency / reconciliation reference for this capture"}},"required":["paymentId","amount","referenceId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/refund_payment":{"post":{"operationId":"tabby_refund_payment","summary":"Refund Payment","description":"Refund all or part of a captured Tabby payment. Returns the refund id and the resulting payment status. This moves money back to the buyer and cannot be undone.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentId":{"type":"string","minLength":1,"description":"Tabby payment id to refund"},"amount":{"type":"string","minLength":1,"description":"Amount to refund as a decimal string, e.g. \"100.00\""},"referenceId":{"type":"string","minLength":1,"description":"Idempotency / reconciliation reference for this refund"},"reason":{"type":"string","description":"Optional human-readable refund reason"}},"required":["paymentId","amount","referenceId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/close_payment":{"post":{"operationId":"tabby_close_payment","summary":"Close Payment","description":"Close a Tabby payment. Closed is the final payment state. Close without capturing to fully cancel an order (the customer is refunded for anything paid); capture the delivered part first then close to settle a partial order. This is irreversible.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentId":{"type":"string","minLength":1,"description":"Tabby payment id to close"}},"required":["paymentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/list_payments":{"post":{"operationId":"tabby_list_payments","summary":"List Payments","description":"List Tabby payments, optionally filtered by status or a created_at date range. Paginated with limit (max 20) and offset.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by status: authorized, closed, rejected, new, captured, refunded, cancelled"},"createdAtGte":{"type":"string","description":"ISO8601 lower bound on created_at"},"createdAtLte":{"type":"string","description":"ISO8601 upper bound on created_at"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":20,"default":20,"description":"Page size, Tabby max is 20"},"offset":{"type":"integer","minimum":0,"default":0,"description":"Zero-based pagination offset"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/register_webhook":{"post":{"operationId":"tabby_register_webhook","summary":"Register Payment Webhook","description":"Register an HTTPS endpoint Tabby will POST payment notifications to (authorized, closed, rejected, etc.). Optionally set a custom signing header (title + value): Tabby will send that header on every notification so you can verify authenticity. Store the header value as the connection webhook_secret to enable parse_webhook_event verification. The merchant code from the stored credentials is sent automatically.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public HTTPS endpoint Tabby will POST payment notifications to (not local)"},"headerTitle":{"type":"string","description":"Optional custom header name Tabby will send on every notification, used to sign/verify the request"},"headerValue":{"type":"string","description":"Optional shared-secret value sent in the custom header; store this as the connection webhook_secret"}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/list_webhooks":{"post":{"operationId":"tabby_list_webhooks","summary":"List Webhooks","description":"List the Tabby webhooks registered for this merchant. Tabby returns the single registered webhook (or none). Read-only.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/get_webhook":{"post":{"operationId":"tabby_get_webhook","summary":"Get Webhook","description":"Retrieve a single registered Tabby webhook by its id, including its notification URL and signing header name. Read-only.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1,"description":"Tabby webhook id (UUID)"}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/delete_webhook":{"post":{"operationId":"tabby_delete_webhook","summary":"Delete Webhook","description":"Remove a registered Tabby webhook by its id. After this, Tabby stops sending payment notifications to that endpoint. This cannot be undone.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"webhookId":{"type":"string","minLength":1,"description":"Tabby webhook id (UUID) to remove"}},"required":["webhookId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tabby/parse_webhook_event":{"post":{"operationId":"tabby_parse_webhook_event","summary":"Verify & Parse Webhook Event","description":"Verify a Tabby webhook notification against the connection's webhook_secret and parse it into a typed event (eventType, payment id, status, amount). Tabby signs by sending the shared-secret value in the custom header you set when registering the webhook; an HMAC-SHA256 of the raw body is also accepted. Purely local — no network, no money movement. Use this before trusting any inbound Tabby webhook.","tags":["tabby"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"rawBody":{"type":"string","minLength":1,"description":"The exact raw request body Tabby POSTed, as a string"},"signature":{"type":"string","default":"","description":"The value of Tabby's signing header (the custom header you set when registering the webhook)"}},"required":["rawBody"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/create_checkout_session":{"post":{"operationId":"tamara_create_checkout_session","summary":"Create Checkout Session","description":"Create a Tamara BNPL checkout session for an order (POST /checkout). Returns the Tamara order id, checkout id, status and the hosted checkout_url to redirect the buyer to. Amounts are decimal strings; items must reconcile with the order total.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderReferenceId":{"type":"string","minLength":1,"description":"Your internal unique order id, echoed back on the order"},"orderNumber":{"type":"string","description":"Optional human-facing order number"},"totalAmount":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"Amount as a decimal string, e.g. \"320.00\""},"currency":{"type":"string","enum":["SAR","AED","BHD","KWD","OMR"],"description":"ISO currency, must match the consumer country"}},"required":["amount","currency"],"additionalProperties":false,"description":"Grand total the buyer will pay"},"shippingAmount":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Total shipping cost (0.00 if none)"},"taxAmount":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Total tax (0.00 if none)"},"description":{"type":"string","minLength":1,"maxLength":256,"description":"Short order description shown to the buyer"},"countryCode":{"type":"string","enum":["SA","AE","BH","KW","OM"],"description":"Consumer country, drives available instalment plans"},"locale":{"type":"string","enum":["ar_SA","en_US"],"default":"en_US","description":"Checkout language: ar_SA or en_US"},"paymentType":{"type":"string","default":"PAY_BY_INSTALMENTS","description":"Tamara payment type, e.g. PAY_BY_INSTALMENTS, PAY_NEXT_MONTH, PAY_NOW"},"instalments":{"type":"integer","exclusiveMinimum":0,"description":"Number of instalments when paymentType is PAY_BY_INSTALMENTS"},"consumer":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"description":"Buyer first name"},"last_name":{"type":"string","minLength":1,"description":"Buyer last name"},"phone_number":{"type":"string","minLength":1,"description":"Buyer phone in international format"},"email":{"type":"string","format":"email","description":"Buyer email"}},"required":["first_name","last_name","phone_number","email"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Product name"},"type":{"type":"string","minLength":1,"description":"Item type, e.g. \"Physical\""},"reference_id":{"type":"string","minLength":1,"description":"Merchant item reference id"},"sku":{"type":"string","minLength":1,"maxLength":128,"description":"Item SKU"},"quantity":{"type":"integer","exclusiveMinimum":0,"description":"Quantity ordered"},"unit_price":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Price per unit"},"total_amount":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Line total (unit_price * quantity)"}},"required":["name","type","reference_id","sku","quantity","unit_price","total_amount"],"additionalProperties":false},"minItems":1,"description":"Order line items; amounts must reconcile with totalAmount"},"shippingAddress":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"description":"Recipient first name"},"last_name":{"type":"string","minLength":1,"description":"Recipient last name"},"line1":{"type":"string","minLength":1,"description":"Street address line 1"},"line2":{"type":"string","description":"Street address line 2"},"city":{"type":"string","minLength":1,"description":"City"},"country_code":{"type":"string","enum":["SA","AE","BH","KW","OM"],"description":"ISO 3166-1 alpha-2 country code"},"phone_number":{"type":"string","description":"Contact phone"}},"required":["first_name","last_name","line1","city","country_code"],"additionalProperties":false},"billingAddress":{"$ref":"#/properties/shippingAddress"},"successUrl":{"type":"string","format":"uri","description":"Where Tamara redirects the buyer after approval"},"failureUrl":{"type":"string","format":"uri","description":"Where Tamara redirects the buyer on failure"},"cancelUrl":{"type":"string","format":"uri","description":"Where Tamara redirects the buyer on cancel"},"notificationUrl":{"type":"string","format":"uri","description":"Server-to-server webhook URL Tamara posts order updates to"}},"required":["orderReferenceId","totalAmount","shippingAmount","taxAmount","description","countryCode","consumer","items","shippingAddress","successUrl","failureUrl","cancelUrl","notificationUrl"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/get_order":{"post":{"operationId":"tamara_get_order","summary":"Get Order / Payment","description":"Fetch a Tamara order's current state by order id (GET /orders/{order_id}). Returns the order status (new, approved, authorised, fully_captured, fully_refunded, canceled, expired, declined), your order reference, and the order amount. Read-only.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Tamara order id (UUID)"}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/authorise_order":{"post":{"operationId":"tamara_authorise_order","summary":"Authorise Order","description":"Confirm receipt of Tamara's approved notification and move the order to authorised (POST /orders/{order_id}/authorise). Call this after you receive the approved webhook and before capturing. Returns the resulting order status.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Tamara order id to authorise (after you received the approved notification)"}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/capture_payment":{"post":{"operationId":"tamara_capture_payment","summary":"Capture Payment","description":"Capture all or part of an authorised Tamara order once it ships/fulfils (POST /payments/capture). Send the full order total for a full capture or a smaller amount for a partial capture. Tamara auto-captures after 21 days if you do not. Returns the capture id and resulting order status.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Tamara order id to capture"},"totalAmount":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"Amount as a decimal string, e.g. \"320.00\""},"currency":{"type":"string","enum":["SAR","AED","BHD","KWD","OMR"],"description":"ISO currency, must match the consumer country"}},"required":["amount","currency"],"additionalProperties":false,"description":"Amount to capture; less than the order total for a partial capture"},"shippingInfo":{"type":"object","properties":{"shippedAt":{"type":"string","minLength":1,"description":"ISO8601 timestamp the order was shipped"},"shippingCompany":{"type":"string","minLength":1,"description":"Carrier name"},"trackingNumber":{"type":"string","description":"Carrier tracking number"},"trackingUrl":{"type":"string","description":"Carrier tracking URL"}},"required":["shippedAt","shippingCompany"],"additionalProperties":false,"description":"Fulfilment / shipment details"},"shippingAmount":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Shipping portion captured"},"taxAmount":{"$ref":"#/properties/shippingAmount","description":"Tax portion captured"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Product name"},"type":{"type":"string","minLength":1,"description":"Item type, e.g. \"Physical\""},"reference_id":{"type":"string","minLength":1,"description":"Merchant item reference id"},"sku":{"type":"string","minLength":1,"maxLength":128,"description":"Item SKU"},"quantity":{"type":"integer","exclusiveMinimum":0,"description":"Quantity ordered"},"unit_price":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Price per unit"},"total_amount":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Line total (unit_price * quantity)"}},"required":["name","type","reference_id","sku","quantity","unit_price","total_amount"],"additionalProperties":false},"description":"Captured line items (optional, for partial captures)"}},"required":["orderId","totalAmount","shippingInfo"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/refund_payment":{"post":{"operationId":"tamara_refund_payment","summary":"Refund Payment","description":"Refund all or part of a captured Tamara order (POST /payments/refund). Refunds are broken down per capture, so pass the capture_id from the original capture. Returns the refund id and resulting order status. This moves money back to the buyer and cannot be undone.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Tamara order id to refund"},"captureId":{"type":"string","minLength":1,"description":"The capture_id issued when the order was captured; refunds are broken down per capture"},"totalAmount":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"Amount as a decimal string, e.g. \"320.00\""},"currency":{"type":"string","enum":["SAR","AED","BHD","KWD","OMR"],"description":"ISO currency, must match the consumer country"}},"required":["amount","currency"],"additionalProperties":false,"description":"Amount to refund; less than captured for a partial refund"},"comment":{"type":"string","description":"Optional human-readable refund reason"}},"required":["orderId","captureId","totalAmount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/cancel_order":{"post":{"operationId":"tamara_cancel_order","summary":"Cancel Order","description":"Cancel a Tamara order and charge the amount back to the consumer (POST /orders/{order_id}/cancel). Use before capture; orders in approved state cannot be cancelled (Tamara returns 409). Returns the resulting status (canceled or updated). This reverses the order and cannot be undone.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Tamara order id to cancel"},"totalAmount":{"type":"object","properties":{"amount":{"type":"string","minLength":1,"description":"Amount as a decimal string, e.g. \"320.00\""},"currency":{"type":"string","enum":["SAR","AED","BHD","KWD","OMR"],"description":"ISO currency, must match the consumer country"}},"required":["amount","currency"],"additionalProperties":false,"description":"Total amount to charge back to the consumer on cancel"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Product name"},"type":{"type":"string","minLength":1,"description":"Item type, e.g. \"Physical\""},"reference_id":{"type":"string","minLength":1,"description":"Merchant item reference id"},"sku":{"type":"string","minLength":1,"maxLength":128,"description":"Item SKU"},"quantity":{"type":"integer","exclusiveMinimum":0,"description":"Quantity ordered"},"unit_price":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Price per unit"},"total_amount":{"type":"object","properties":{"amount":{"$ref":"#/properties/totalAmount/properties/amount"},"currency":{"$ref":"#/properties/totalAmount/properties/currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Line total (unit_price * quantity)"}},"required":["name","type","reference_id","sku","quantity","unit_price","total_amount"],"additionalProperties":false},"description":"Items being cancelled (optional)"}},"required":["orderId","totalAmount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/get_payment_types":{"post":{"operationId":"tamara_get_payment_types","summary":"Get Payment Types","description":"List the Tamara payment types (e.g. PAY_BY_INSTALMENTS, PAY_NEXT_MONTH, PAY_NOW) available for a given country, currency and order value (GET /checkout/payment-types). Use this before checkout to show the buyer only eligible plans. Read-only.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"country":{"type":"string","enum":["SA","AE","BH","KW","OM"],"description":"Consumer country code (SA, AE, BH, KW, OM)"},"currency":{"type":"string","enum":["SAR","AED","BHD","KWD","OMR"],"description":"Order currency, must match the country"},"orderValue":{"type":"number","exclusiveMinimum":0,"description":"Order value the buyer would pay, used to filter eligible plans"},"phoneNumber":{"type":"string","description":"Optional consumer phone to personalise eligibility"}},"required":["country","currency","orderValue"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tamara/parse_webhook_event":{"post":{"operationId":"tamara_parse_webhook_event","summary":"Verify & Parse Webhook Event","description":"Verify a Tamara webhook notification against the connection's notification_token and parse it into a typed event (eventType, order id, order reference, status). Tamara attaches its Notification Token as the tamaraToken query param and as a Bearer authorization header; pass that value as `token`. Purely local — no network, no money movement. Use this before trusting any inbound Tamara webhook.","tags":["tamara"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"rawBody":{"type":"string","minLength":1,"description":"The exact raw request body Tamara POSTed, as a string"},"token":{"type":"string","default":"","description":"The tamaraToken value Tamara sent (query param or Bearer authorization header)"}},"required":["rawBody"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/create_shipment":{"post":{"operationId":"smsa_create_shipment","summary":"Create Shipment","description":"Create an SMSA Express shipment in Saudi Arabia. Returns the air waybill (AWB) and status. Set codAmount to the cash-on-delivery amount in SAR, or 0 if prepaid.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"consignee":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Recipient full name"},"phone":{"type":"string","pattern":"^(?:\\+?9665|05)[0-9]{8}$","description":"Recipient Saudi mobile number"},"city":{"type":"string","minLength":1,"description":"Destination city, e.g. Riyadh"},"addressLine":{"type":"string","minLength":1,"description":"Street address"},"country":{"type":"string","minLength":2,"maxLength":2,"default":"SA","description":"ISO-2 country code, SA for domestic"}},"required":["name","phone","city","addressLine"],"additionalProperties":false},"pieces":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Number of pieces in the shipment"},"weight":{"type":"number","exclusiveMinimum":0,"description":"Total shipment weight in kg"},"codAmount":{"type":"number","minimum":0,"default":0,"description":"Cash-on-delivery amount in SAR. 0 if prepaid."},"contentDescription":{"type":"string","minLength":1,"description":"What is being shipped"},"customerReference":{"type":"string","description":"Your internal order id, echoed back on the AWB"}},"required":["consignee","weight","contentDescription"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/track_shipment":{"post":{"operationId":"smsa_track_shipment","summary":"Track Shipment","description":"Fetch the current status and full scan history of one SMSA Express shipment by its air waybill (AWB).","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"awb":{"type":"string","minLength":1,"description":"SMSA air waybill number"}},"required":["awb"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/cancel_shipment":{"post":{"operationId":"smsa_cancel_shipment","summary":"Cancel Shipment","description":"Cancel an SMSA Express shipment before it has been picked up. This cannot be undone.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"awb":{"type":"string","minLength":1,"description":"Air waybill of the shipment to cancel before pickup"}},"required":["awb"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/get_rates":{"post":{"operationId":"smsa_get_rates","summary":"Get Rates","description":"Estimate the SMSA Express shipping cost for a domestic Saudi shipment before creating it. Returns shipping cost and any COD fee in SAR.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"destinationCity":{"type":"string","minLength":1,"description":"Destination city"},"weight":{"type":"number","exclusiveMinimum":0,"default":1,"description":"Shipment weight in kg"},"codAmount":{"type":"number","minimum":0,"default":0,"description":"Cash-on-delivery amount in SAR for the fee estimate"}},"required":["destinationCity"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/request_pickup":{"post":{"operationId":"smsa_request_pickup","summary":"Request Pickup","description":"Schedule an SMSA Express driver pickup for ready shipments. Returns the pickup confirmation id and the scheduled date.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"pickupDate":{"type":"string","minLength":1,"description":"Requested pickup date, ISO date e.g. 2026-05-20"},"readyTime":{"type":"string","default":"10:00","description":"Earliest ready time, HH:mm 24h"},"closeTime":{"type":"string","default":"17:00","description":"Latest pickup time, HH:mm 24h"},"piecesCount":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Number of pieces ready for pickup"},"awb":{"type":"string","description":"Optional AWB to attach the pickup to"}},"required":["pickupDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/get_shipment":{"post":{"operationId":"smsa_get_shipment","summary":"Get Shipment","description":"Fetch the current status and details of one SMSA Express shipment by its air waybill (AWB). Use track_shipment instead if you need the full scan history.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"awb":{"type":"string","minLength":1,"description":"SMSA air waybill number"}},"required":["awb"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/list_shipments":{"post":{"operationId":"smsa_list_shipments","summary":"List Shipments","description":"List SMSA Express shipments, optionally filtered by status, created-date range (fromDate/toDate as ISO dates), or your internal customerReference. Paginated.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by SMSA status, e.g. Delivered"},"fromDate":{"type":"string","description":"Start of created-date range, ISO date"},"toDate":{"type":"string","description":"End of created-date range, ISO date"},"customerReference":{"type":"string","description":"Filter by your internal order id"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Page size, max 200"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/print_label":{"post":{"operationId":"smsa_print_label","summary":"Print Label","description":"Get the printable airwaybill (AWB) label PDF for an SMSA Express shipment by AWB. Print this and attach it to the parcel before the courier pickup. Returns either a PDF URL or base64-encoded PDF bytes.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"awb":{"type":"string","minLength":1,"description":"SMSA air waybill number"}},"required":["awb"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/get_cities":{"post":{"operationId":"smsa_get_cities","summary":"Get Cities","description":"List the Saudi cities SMSA Express serves. Use a returned city code with smsa_get_sectors or when creating a shipment.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/get_sectors":{"post":{"operationId":"smsa_get_sectors","summary":"Get Sectors","description":"List the sectors / retail drop-off locations within an SMSA Express city. Pass cityCode from smsa_get_cities.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cityCode":{"type":"string","minLength":1,"description":"SMSA city code from smsa_get_cities"}},"required":["cityCode"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/cancel_pickup":{"post":{"operationId":"smsa_cancel_pickup","summary":"Cancel Pickup","description":"Cancel a previously scheduled SMSA Express driver pickup by its pickup id. This cannot be undone.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"pickupId":{"type":"string","minLength":1,"description":"Pickup confirmation id from smsa_request_pickup"}},"required":["pickupId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/get_cod_settlement":{"post":{"operationId":"smsa_get_cod_settlement","summary":"Get COD Settlement","description":"Get the cash-on-delivery settlement statement for a date range: how much COD SMSA collected, how much it has remitted to you, and the per-AWB breakdown. Use this to reconcile COD payouts.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"fromDate":{"type":"string","minLength":1,"description":"Start of settlement date range, ISO date"},"toDate":{"type":"string","minLength":1,"description":"End of settlement date range, ISO date"}},"required":["fromDate","toDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsa/register_webhook":{"post":{"operationId":"smsa_register_webhook","summary":"Register Tracking Webhook","description":"Register an HTTPS endpoint that SMSA Express will POST shipment tracking events to (picked up, in transit, delivered, exception, returned). Pass the url; optionally restrict to specific SMSA status names, otherwise all events are sent. Use this once to wire live status updates instead of polling track_shipment.","tags":["smsa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint SMSA will POST tracking events to"},"events":{"type":"array","items":{"type":"string"},"description":"Optional list of SMSA status names to subscribe to; all if omitted"}},"required":["url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/send_sms":{"post":{"operationId":"smsmisr_send_sms","summary":"Send SMS","description":"Send a single transactional or marketing SMS to an Egyptian mobile number via SMS Misr. mobile must be international format without + (e.g. 201001234567).","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mobile":{"type":"string","pattern":"^20(10|11|12|15)[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 201001234567"},"message":{"type":"string","minLength":1,"maxLength":1071,"description":"The SMS body text to deliver to the recipient."},"language":{"type":"string","enum":["english","arabic","unicode"],"default":"english","description":"Message language. english=1, arabic=2, unicode=3 in the SMS Misr API."}},"required":["mobile","message"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/send_bulk_sms":{"post":{"operationId":"smsmisr_send_bulk_sms","summary":"Send Bulk SMS","description":"Send the same SMS to many Egyptian mobile numbers in one SMS Misr call (one batch, one smsId). Each mobile must be international format without + (e.g. 201001234567). Use this for campaigns instead of looping send_sms.","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mobiles":{"type":"array","items":{"type":"string","pattern":"^20(10|11|12|15)[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 201001234567"},"minItems":1,"maxItems":1000,"description":"Recipient mobiles in international format without +, e.g. ['201001234567']. Up to 1000 per call."},"message":{"type":"string","minLength":1,"maxLength":1071,"description":"The SMS body text delivered to every recipient."},"language":{"type":"string","enum":["english","arabic","unicode"],"default":"english","description":"Message language. english=1, arabic=2, unicode=3 in the SMS Misr API."}},"required":["mobiles","message"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/schedule_sms":{"post":{"operationId":"smsmisr_schedule_sms","summary":"Schedule SMS","description":"Send an SMS to be delivered at a future time using SMS Misr's DelayUntil. delayUntil is yyyyMMddHHmm in the SMS Misr account local time (e.g. 202509121230). Use this instead of send_sms when delivery should not be immediate.","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mobile":{"type":"string","pattern":"^20(10|11|12|15)[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 201001234567"},"message":{"type":"string","minLength":1,"maxLength":1071,"description":"The SMS body text to deliver when the schedule fires."},"language":{"type":"string","enum":["english","arabic","unicode"],"default":"english","description":"Message language. english=1, arabic=2, unicode=3 in the SMS Misr API."},"delayUntil":{"type":"string","pattern":"^\\d{12}$","description":"When to deliver, as yyyyMMddHHmm in SMS Misr account local time, e.g. 202509121230 for 2025-09-12 12:30."}},"required":["mobile","message","delayUntil"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/send_otp":{"post":{"operationId":"smsmisr_send_otp","summary":"Send OTP","description":"Send a one-time password to an Egyptian mobile via SMS Misr's OTP template. You generate the otp value; SMS Misr only delivers it. The response includes sentAt and attemptCount which you MUST pass back into verify_otp.","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mobile":{"type":"string","pattern":"^20(10|11|12|15)[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 201001234567"},"otp":{"type":"string","minLength":4,"maxLength":8,"pattern":"^[0-9]+$","description":"The one-time code to deliver. You generate it; SMS Misr only sends it."},"template":{"type":"string","minLength":1,"description":"SMS Misr OTP template token (from the SMS Misr dashboard, OTP templates)."}},"required":["mobile","otp","template"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/verify_otp":{"post":{"operationId":"smsmisr_verify_otp","summary":"Verify OTP","description":"Check a user-submitted OTP against the value you sent with send_otp, enforcing a TTL. SMS Misr has no verify endpoint so this is a local check. Pass sentAt and attemptCount from the prior send_otp/verify_otp result; the returned attemptCount is incremented and audited.","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"expectedOtp":{"type":"string","minLength":4,"maxLength":8,"description":"The OTP value you sent earlier via send_otp."},"submittedOtp":{"type":"string","minLength":1,"description":"The OTP value the end user typed in."},"sentAt":{"type":"string","description":"ISO 8601 timestamp from the send_otp response. Used for expiry."},"attemptCount":{"type":"integer","minimum":0,"default":0,"description":"Number of prior verification attempts. The caller tracks and increments this."},"ttlSeconds":{"type":"integer","exclusiveMinimum":0,"default":300,"description":"Seconds the OTP stays valid after sentAt. Default 300 (5 min)."}},"required":["expectedOtp","submittedOtp","sentAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/get_balance":{"post":{"operationId":"smsmisr_get_balance","summary":"Get Balance","description":"Return the remaining SMS Misr account credit. Use this to check before a large send.","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/get_sender_ids":{"post":{"operationId":"smsmisr_get_sender_ids","summary":"Get Sender IDs","description":"List the sender ID(s) this SMS Misr connection can send from. SMS Misr has no sender-list API, so this returns the approved sender bound to the connection credentials. Manage and approve senders in the SMS Misr dashboard (Sender Names).","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/get_delivery_report":{"post":{"operationId":"smsmisr_get_delivery_report","summary":"Get Delivery Report","description":"Fetch the delivery status of a previously sent SMS or OTP by its smsId (returned by send_sms / send_otp).","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"smsId":{"type":"string","minLength":1,"description":"The smsId returned by send_sms or send_otp."}},"required":["smsId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/smsmisr/parse_delivery_report":{"post":{"operationId":"smsmisr_parse_delivery_report","summary":"Parse Delivery Report Callback","description":"Parse a raw SMS Misr delivery-report (DLR) callback body (JSON string or object) into a stable {smsId, status, mobile, code, deliveredAt} shape with status normalized to UPPER_SNAKE. Use this in your webhook handler instead of poking at SMS Misr's raw envelope. No network call.","tags":["smsmisr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payload":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}],"description":"Raw SMS Misr delivery-report callback body: a JSON string or an already-parsed object."}},"required":["payload"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_sms":{"post":{"operationId":"unifonic_send_sms","summary":"Send SMS","description":"Send a single SMS to a Saudi mobile number via Unifonic. recipient must be international format without + (e.g. 966512345678).","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"The SMS message text to deliver."},"senderId":{"type":"string","minLength":1,"description":"Registered sender name. Falls back to the connection's default sender."}},"required":["recipient","body"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_whatsapp":{"post":{"operationId":"unifonic_send_whatsapp","summary":"Send WhatsApp","description":"Send a WhatsApp message to a Saudi number via Unifonic. The first message to a new contact may require an approved template.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"body":{"type":"string","minLength":1,"maxLength":4096,"description":"WhatsApp message text. Template messages may be required for the first contact."},"senderId":{"type":"string","minLength":1,"description":"Registered WhatsApp sender. Falls back to the connection default."}},"required":["recipient","body"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_voice":{"post":{"operationId":"unifonic_send_voice","summary":"Send Voice","description":"Place an automated text-to-speech voice call to a Saudi number via Unifonic, reading out the provided body in the chosen language.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"body":{"type":"string","minLength":1,"maxLength":1000,"description":"Text to be read out by text-to-speech on the call."},"language":{"type":"string","enum":["en","ar"],"default":"ar","description":"Text-to-speech language. ar = Arabic, en = English."}},"required":["recipient","body"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/verify_otp":{"post":{"operationId":"unifonic_verify_otp","summary":"Verify OTP","description":"Validate a user-submitted OTP for a Saudi recipient via Unifonic Authenticate. Pass sentAt and attemptCount from when the OTP was sent; the returned attemptCount is incremented and audited.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"code":{"type":"string","minLength":1,"description":"The OTP code the end user submitted, to validate with Unifonic."},"sentAt":{"type":"string","description":"ISO 8601 timestamp the OTP was originally sent. Persisted in the audit trail."},"attemptCount":{"type":"integer","minimum":0,"default":0,"description":"Prior verification attempts for this OTP. The caller tracks and increments this; it is audited."}},"required":["recipient","code","sentAt"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/get_balance":{"post":{"operationId":"unifonic_get_balance","summary":"Get Balance","description":"Return the remaining Unifonic account balance and its currency. Use before a large send.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/create_campaign":{"post":{"operationId":"unifonic_create_campaign","summary":"Create Campaign","description":"Create a Unifonic SMS campaign for a recipient list. Returns the campaign id. The campaign is not sent until send_campaign runs (or the optional schedule time).","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Campaign name shown in Unifonic."},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"Message text for the blast."},"recipients":{"type":"array","items":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"minItems":1,"description":"Recipient mobiles, international format without +."},"senderId":{"type":"string","minLength":1,"description":"Approved sender id. Defaults to the connection sender."},"timeScheduled":{"type":"string","description":"Optional schedule, Unifonic datetime format. Omit to draft."}},"required":["name","body","recipients"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_campaign":{"post":{"operationId":"unifonic_send_campaign","summary":"Send Campaign","description":"Send a previously created Unifonic campaign now. This delivers real messages to every recipient and consumes balance; confirm before running.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Campaign id to send now."}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/get_campaign_report":{"post":{"operationId":"unifonic_get_campaign_report","summary":"Get Campaign Report","description":"Read delivery stats for a Unifonic campaign: sent, delivered, and failed counts. Read-only.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Campaign id to report on."}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_bulk_sms":{"post":{"operationId":"unifonic_send_bulk_sms","summary":"Send Bulk SMS","description":"Send one SMS body to many Saudi numbers in a single Unifonic SendBulk call. Use for transactional fan-out; for marketing blasts with reporting use create_campaign. This delivers real messages and consumes balance; confirm before running.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipients":{"type":"array","items":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"minItems":1,"maxItems":10000,"description":"Recipient mobiles, international format without +. Sent as one comma-separated SendBulk call."},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"The SMS text delivered to every recipient."},"senderId":{"type":"string","minLength":1,"description":"Registered sender name. Falls back to the connection's default sender."}},"required":["recipients","body"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_scheduled_sms":{"post":{"operationId":"unifonic_send_scheduled_sms","summary":"Send Scheduled SMS","description":"Schedule an SMS to a Saudi number for a future time via Unifonic SendScheduled. timeScheduled is Unifonic datetime 'YYYY-MM-DD HH:mm:ss' in the account timezone. Returns a messageId you can later cancel with stop_scheduled_message.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"body":{"type":"string","minLength":1,"maxLength":1600,"description":"The SMS text to deliver at the scheduled time."},"timeScheduled":{"type":"string","description":"When to send, Unifonic datetime format 'YYYY-MM-DD HH:mm:ss' (account timezone)."},"senderId":{"type":"string","minLength":1,"description":"Registered sender name. Falls back to the connection default."}},"required":["recipient","body","timeScheduled"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/stop_scheduled_message":{"post":{"operationId":"unifonic_stop_scheduled_message","summary":"Stop Scheduled Message","description":"Cancel a previously scheduled Unifonic SMS before its send time, using the messageId returned by send_scheduled_sms.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"The scheduled message id returned by send_scheduled_sms."}},"required":["messageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/get_message_status":{"post":{"operationId":"unifonic_get_message_status","summary":"Get Message Status","description":"Read the delivery status of a single sent message by its messageId (from send_sms or send_bulk_sms) via Unifonic GetMessageIDStatus. Read-only.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"The MessageID returned by send_sms / send_bulk_sms."}},"required":["messageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/create_otp":{"post":{"operationId":"unifonic_create_otp","summary":"Create OTP","description":"Send a one-time passcode to a Saudi recipient via Unifonic Authenticate over SMS, voice, or WhatsApp. Returns sentAt; pass it into verify_otp when the user submits the code.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"channel":{"type":"string","enum":["sms","voice","whatsapp"],"default":"sms","description":"Delivery channel for the OTP code."},"locale":{"type":"string","enum":["en","ar"],"default":"ar","description":"Message locale. ar = Arabic, en = English."},"length":{"type":"integer","minimum":4,"maximum":10,"description":"OTP code length. Defaults to the Unifonic app setting."}},"required":["recipient"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/list_senders":{"post":{"operationId":"unifonic_list_senders","summary":"List Sender IDs","description":"List the approved sender IDs registered on the Unifonic account, with their approval status. Read-only. Use to pick a valid senderId before sending.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/send_whatsapp_template":{"post":{"operationId":"unifonic_send_whatsapp_template","summary":"Send WhatsApp Template","description":"Send an approved WhatsApp Business template (HSM) message to a Saudi number via Unifonic. Use for the first contact or outside the 24h session window. Provide the template name, language, and ordered placeholder values.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^9665[0-9]{8}$","description":"Recipient mobile in international format without +, e.g. 966512345678"},"templateName":{"type":"string","minLength":1,"description":"Approved WhatsApp Business template (HSM) name."},"language":{"type":"string","minLength":2,"default":"ar","description":"Template language code, e.g. 'ar' or 'en'."},"parameters":{"type":"array","items":{"type":"string"},"default":[],"description":"Ordered body placeholder values substituted into the template, in order."},"senderId":{"type":"string","minLength":1,"description":"Registered WhatsApp sender. Falls back to the connection default."}},"required":["recipient","templateName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/unifonic/parse_dlr":{"post":{"operationId":"unifonic_parse_dlr","summary":"Parse Delivery Receipt","description":"Parse a raw Unifonic delivery-receipt (DLR / status callback) webhook body into a normalized object: messageId, recipient, status (UPPER_SNAKE), errorCode, timestamp. Pure transform, no API call.","tags":["unifonic"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payload":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}],"description":"Raw Unifonic DLR webhook body (JSON string or already-parsed object)."}},"required":["payload"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/eta-egypt/submit_invoice":{"post":{"operationId":"eta-egypt_submit_invoice","summary":"Submit e-Invoice","description":"Submit one or more already-signed B2B e-invoice documents to the Egyptian Tax Authority. Documents must already carry their CAdES signature; Wassel does not sign in V1. Returns ETA's submission UUID and per-document accept/reject results.","tags":["eta-egypt"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","additionalProperties":{}},"minItems":1,"description":"Array of already-signed ETA e-invoice document objects (B2B). Each must include its `signatures` array; Wassel does not sign for you in V1."}},"required":["documents"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/eta-egypt/get_document":{"post":{"operationId":"eta-egypt_get_document","summary":"Get e-Invoice Document","description":"Fetch one B2B e-invoice document from the Egyptian Tax Authority by its UUID, including ETA validation status and the full document JSON.","tags":["eta-egypt"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"uuid":{"type":"string","minLength":1,"description":"ETA document UUID."}},"required":["uuid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/eta-egypt/get_recent_documents":{"post":{"operationId":"eta-egypt_get_recent_documents","summary":"Get Recent e-Invoices","description":"List the taxpayer's most recent B2B e-invoice documents from the Egyptian Tax Authority, paginated.","tags":["eta-egypt"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Documents per page (ETA caps at 100)."},"pageNumber":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/eta-egypt/cancel_document":{"post":{"operationId":"eta-egypt_cancel_document","summary":"Cancel e-Invoice Document","description":"Request cancellation of a submitted B2B e-invoice at the Egyptian Tax Authority. The buyer can still reject the cancellation within ETA's window. Irreversible from Wassel's side; confirm before running.","tags":["eta-egypt"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"uuid":{"type":"string","minLength":1,"description":"UUID of the document to cancel."},"reason":{"type":"string","minLength":1,"description":"Cancellation reason recorded with ETA (required)."}},"required":["uuid","reason"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/eta-egypt/submit_receipt":{"post":{"operationId":"eta-egypt_submit_receipt","summary":"Submit e-Receipt","description":"Submit one or more already-signed B2C e-receipts to the Egyptian Tax Authority eReceipt system. Receipts must already carry their POS signature; Wassel does not sign in V1. Returns the submission UUID and accept/reject counts.","tags":["eta-egypt"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"receipts":{"type":"array","items":{"type":"object","additionalProperties":{}},"minItems":1,"description":"Array of already-signed ETA e-receipt objects (B2C). Each must include its `header`, `seller`, `itemData` and signature; Wassel does not sign in V1."}},"required":["receipts"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/eta-egypt/get_receipt":{"post":{"operationId":"eta-egypt_get_receipt","summary":"Get e-Receipt","description":"Fetch one B2C e-receipt from the Egyptian Tax Authority eReceipt system by its UUID, including status and the full receipt JSON.","tags":["eta-egypt"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"uuid":{"type":"string","minLength":1,"description":"ETA receipt UUID."}},"required":["uuid"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-business/list_campaigns":{"post":{"operationId":"tiktok-business_list_campaigns","summary":"List Campaigns","description":"List TikTok ad campaigns for an advertiser account. Paginated with page and pageSize. Returns campaign id, name, objective, status and budget.","tags":["tiktok-business"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"advertiserId":{"type":"string","minLength":1,"description":"TikTok advertiser (ad account) id. Find it in TikTok Ads Manager or via the OAuth /oauth2/advertiser/get/ endpoint."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"default":20,"description":"Campaigns per page, max 1000"}},"required":["advertiserId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-business/pause_campaign":{"post":{"operationId":"tiktok-business_pause_campaign","summary":"Pause Campaign","description":"Pause a TikTok ad campaign by setting its operation status to DISABLE. Stops delivery and spend for the campaign.","tags":["tiktok-business"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"advertiserId":{"type":"string","minLength":1,"description":"TikTok advertiser (ad account) id. Find it in TikTok Ads Manager or via the OAuth /oauth2/advertiser/get/ endpoint."},"campaignId":{"type":"string","minLength":1,"description":"Campaign id to pause (set DISABLE)"}},"required":["advertiserId","campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-business/resume_campaign":{"post":{"operationId":"tiktok-business_resume_campaign","summary":"Resume Campaign","description":"Resume a paused TikTok ad campaign by setting its operation status to ENABLE. Delivery and spend restart for the campaign.","tags":["tiktok-business"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"advertiserId":{"type":"string","minLength":1,"description":"TikTok advertiser (ad account) id. Find it in TikTok Ads Manager or via the OAuth /oauth2/advertiser/get/ endpoint."},"campaignId":{"type":"string","minLength":1,"description":"Campaign id to resume (set ENABLE)"}},"required":["advertiserId","campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-business/get_ad_insights":{"post":{"operationId":"tiktok-business_get_ad_insights","summary":"Get Ad Insights","description":"Fetch a TikTok performance report for a date range at campaign, ad group or ad level. Returns dimensions and the requested metrics (spend, impressions, clicks, conversions).","tags":["tiktok-business"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"advertiserId":{"type":"string","minLength":1,"description":"TikTok advertiser (ad account) id. Find it in TikTok Ads Manager or via the OAuth /oauth2/advertiser/get/ endpoint."},"startDate":{"type":"string","description":"Report start date, YYYY-MM-DD inclusive"},"endDate":{"type":"string","description":"Report end date, YYYY-MM-DD inclusive"},"level":{"type":"string","enum":["AUCTION_CAMPAIGN","AUCTION_ADGROUP","AUCTION_AD"],"default":"AUCTION_CAMPAIGN","description":"Aggregation level for the report"},"metrics":{"type":"array","items":{"type":"string"},"default":["spend","impressions","clicks","conversions"],"description":"Metrics to return, e.g. spend, impressions, clicks"}},"required":["advertiserId","startDate","endDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-business/create_ad":{"post":{"operationId":"tiktok-business_create_ad","summary":"Create Ad","description":"Create a single TikTok ad inside an existing ad group. Provide the identity, ad text, landing page and a video or image creative.","tags":["tiktok-business"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"advertiserId":{"type":"string","minLength":1,"description":"TikTok advertiser (ad account) id. Find it in TikTok Ads Manager or via the OAuth /oauth2/advertiser/get/ endpoint."},"adgroupId":{"type":"string","minLength":1,"description":"Ad group id this ad belongs to"},"adName":{"type":"string","minLength":1,"description":"Ad name"},"identityId":{"type":"string","minLength":1,"description":"TikTok identity (account) id used as the ad's display identity"},"adText":{"type":"string","minLength":1,"description":"Primary ad text / caption"},"landingPageUrl":{"type":"string","format":"uri","description":"Click-through landing page URL"},"videoId":{"type":"string","description":"Uploaded video id for the ad creative"},"imageIds":{"type":"array","items":{"type":"string"},"description":"Uploaded image ids for an image ad creative"},"callToAction":{"type":"string","default":"LEARN_MORE","description":"Call to action enum, e.g. LEARN_MORE, SHOP_NOW"}},"required":["advertiserId","adgroupId","adName","identityId","adText","landingPageUrl"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-business/update_budget":{"post":{"operationId":"tiktok-business_update_budget","summary":"Update Budget","description":"Change the budget of a TikTok ad campaign. The amount is in the advertiser account currency.","tags":["tiktok-business"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"advertiserId":{"type":"string","minLength":1,"description":"TikTok advertiser (ad account) id. Find it in TikTok Ads Manager or via the OAuth /oauth2/advertiser/get/ endpoint."},"campaignId":{"type":"string","minLength":1,"description":"Campaign id whose budget to change"},"budget":{"type":"number","exclusiveMinimum":0,"description":"New campaign budget in the account currency"}},"required":["advertiserId","campaignId","budget"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-ads/list_campaigns":{"post":{"operationId":"google-ads_list_campaigns","summary":"List Campaigns","description":"List Google Ads campaigns for a customer account. Returns campaign id, name, status and advertising channel type.","tags":["google-ads"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"pattern":"^\\d{10}$","description":"Google Ads customer id (10 digits, no dashes), e.g. 1234567890."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"default":50,"description":"Max campaigns to return"}},"required":["customerId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-ads/pause_campaign":{"post":{"operationId":"google-ads_pause_campaign","summary":"Pause Campaign","description":"Pause a Google Ads campaign by setting its status to PAUSED. Stops delivery and spend for the campaign.","tags":["google-ads"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"pattern":"^\\d{10}$","description":"Google Ads customer id (10 digits, no dashes), e.g. 1234567890."},"campaignId":{"type":"string","minLength":1,"description":"Campaign id to pause (status set to PAUSED)"}},"required":["customerId","campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-ads/get_ad_insights":{"post":{"operationId":"google-ads_get_ad_insights","summary":"Get Ad Insights","description":"Fetch Google Ads campaign performance for a date range. Returns the requested metrics (cost in micros, impressions, clicks, conversions) per campaign.","tags":["google-ads"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"pattern":"^\\d{10}$","description":"Google Ads customer id (10 digits, no dashes), e.g. 1234567890."},"startDate":{"type":"string","description":"Report start date, YYYY-MM-DD inclusive"},"endDate":{"type":"string","description":"Report end date, YYYY-MM-DD inclusive"},"metrics":{"type":"array","items":{"type":"string"},"default":["metrics.cost_micros","metrics.impressions","metrics.clicks","metrics.conversions"],"description":"GAQL metric fields, e.g. metrics.cost_micros, metrics.clicks"}},"required":["customerId","startDate","endDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-ads/get_ga_report":{"post":{"operationId":"google-ads_get_ga_report","summary":"Get GA4 Report","description":"Run a Google Analytics 4 report for a property over a date range. Provide GA4 dimensions and metrics; returns the result rows. Uses the same OAuth connection as the Google Ads tools.","tags":["google-ads"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"propertyId":{"type":"string","minLength":1,"pattern":"^\\d+$","description":"GA4 property id (numeric), e.g. properties/123 -> pass 123"},"startDate":{"type":"string","description":"Report start date, YYYY-MM-DD inclusive"},"endDate":{"type":"string","description":"Report end date, YYYY-MM-DD inclusive"},"dimensions":{"type":"array","items":{"type":"string"},"default":["date"],"description":"GA4 dimension names, e.g. date, sessionDefaultChannelGroup"},"metrics":{"type":"array","items":{"type":"string"},"default":["sessions","totalRevenue","conversions"],"description":"GA4 metric names, e.g. sessions, totalRevenue"}},"required":["propertyId","startDate","endDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-ads/get_assisted_conversions":{"post":{"operationId":"google-ads_get_assisted_conversions","summary":"Get Assisted Conversions","description":"Report GA4 conversions and conversion value by default channel group for a date range, as the assisted-conversion proxy for cross-checking ad pauses. Uses the same OAuth connection as the Google Ads tools.","tags":["google-ads"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"propertyId":{"type":"string","minLength":1,"pattern":"^\\d+$","description":"GA4 property id (numeric)"},"startDate":{"type":"string","description":"Report start date, YYYY-MM-DD inclusive"},"endDate":{"type":"string","description":"Report end date, YYYY-MM-DD inclusive"}},"required":["propertyId","startDate","endDate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-ads/list_audiences":{"post":{"operationId":"google-ads_list_audiences","summary":"List Audiences","description":"List Google Ads remarketing audiences (user lists) for a customer account. Returns audience id, name, status and approximate display size.","tags":["google-ads"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customerId":{"type":"string","minLength":1,"pattern":"^\\d{10}$","description":"Google Ads customer id (10 digits, no dashes), e.g. 1234567890."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"default":50}},"required":["customerId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_branches":{"post":{"operationId":"foodics_list_branches","summary":"List Branches","description":"List the branches in the Foodics account. Use a returned branch id to scope orders, inventory and sales reports.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"description":"List the branches in the Foodics account.","$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_orders":{"post":{"operationId":"foodics_list_orders","summary":"List Orders","description":"List Foodics orders, optionally filtered by branch id and business date range (YYYY-MM-DD). Paginated with page.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","description":"Filter to one branch id (from list_branches)."},"business_date_from":{"type":"string","description":"Inclusive lower bound on business date, YYYY-MM-DD."},"business_date_to":{"type":"string","description":"Inclusive upper bound on business date, YYYY-MM-DD."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/get_order":{"post":{"operationId":"foodics_get_order","summary":"Get Order","description":"Fetch one Foodics order by its id, including totals, customer and payment method.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"order_id":{"type":"string","minLength":1,"description":"Foodics order id."}},"required":["order_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_products":{"post":{"operationId":"foodics_list_products","summary":"List Products","description":"List products in the Foodics catalog, optionally filtered by category id. Paginated with page.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"category_id":{"type":"string","description":"Filter by Foodics category id."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/update_inventory":{"post":{"operationId":"foodics_update_inventory","summary":"Update Inventory","description":"Set the absolute on-hand quantity for an inventory item at a branch in Foodics.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","minLength":1,"description":"Branch id the stock belongs to."},"inventory_item_id":{"type":"string","minLength":1,"description":"Foodics inventory item id to adjust."},"quantity":{"type":"number","description":"New absolute on-hand quantity to set for the item."}},"required":["branch_id","inventory_item_id","quantity"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/get_daily_sales":{"post":{"operationId":"foodics_get_daily_sales","summary":"Get Daily Sales","description":"Get the sales summary for a single business date (YYYY-MM-DD), optionally for one branch: order count, gross and net sales.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","description":"Restrict the report to one branch id."},"business_date":{"type":"string","minLength":1,"description":"The business date to report on, YYYY-MM-DD."}},"required":["business_date"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/get_top_items":{"post":{"operationId":"foodics_get_top_items","summary":"Get Top Items","description":"Get the best-selling products over a business date range (YYYY-MM-DD), optionally for one branch, ranked by quantity sold.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","description":"Restrict the report to one branch id."},"business_date_from":{"type":"string","minLength":1,"description":"Inclusive start date, YYYY-MM-DD."},"business_date_to":{"type":"string","minLength":1,"description":"Inclusive end date, YYYY-MM-DD."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":10,"description":"How many top items to return (max 100)."}},"required":["business_date_from","business_date_to"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/get_branch":{"post":{"operationId":"foodics_get_branch","summary":"Get Branch","description":"Fetch one Foodics branch by its id, including localized name, type and geo-coordinates.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","minLength":1,"description":"Foodics branch id (from list_branches)."}},"required":["branch_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_categories":{"post":{"operationId":"foodics_list_categories","summary":"List Categories","description":"List the menu categories in the Foodics catalog. Use a returned category id when creating products or filtering list_products.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/create_category":{"post":{"operationId":"foodics_create_category","summary":"Create Category","description":"Create a new menu category in Foodics. Returns the new category id, which you can pass to create_product.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Category name."},"name_localized":{"type":"string","description":"Localized category name."},"reference":{"type":"string","description":"Your own reference code for the category."},"image":{"type":"string","format":"uri","description":"Public image URL."}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/create_product":{"post":{"operationId":"foodics_create_product","summary":"Create Product","description":"Create a new product in the Foodics catalog under a category. Look up the category_id with list_categories first.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Product name."},"category_id":{"type":"string","minLength":1,"description":"Foodics category id this product belongs to."},"price":{"type":"number","description":"Selling price in the account currency."},"sku":{"type":"string","description":"Stock-keeping unit."},"barcode":{"type":"string","description":"Product barcode."},"name_localized":{"type":"string","description":"Localized product name."},"description":{"type":"string","description":"Product description."},"cost":{"type":"number","description":"Unit cost in the account currency."},"is_active":{"type":"boolean","default":true,"description":"Whether the product is sellable."},"tax_group_id":{"type":"string","description":"Foodics tax group id."}},"required":["name","category_id","price"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/update_product":{"post":{"operationId":"foodics_update_product","summary":"Update Product","description":"Update an existing Foodics product: price, cost, name, category, SKU or active flag. Only the fields you pass are changed.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"product_id":{"type":"string","minLength":1,"description":"Foodics product id to update."},"name":{"type":"string","description":"New product name."},"price":{"type":"number","description":"New selling price."},"cost":{"type":"number","description":"New unit cost."},"is_active":{"type":"boolean","description":"Enable or disable the product."},"category_id":{"type":"string","description":"Move to a different category."},"sku":{"type":"string","description":"New SKU."},"barcode":{"type":"string","description":"New barcode."}},"required":["product_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_inventory_items":{"post":{"operationId":"foodics_list_inventory_items","summary":"List Inventory Items","description":"List stock-tracked inventory items in Foodics, optionally filtered by inventory category id or SKU. Paginated with page.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"category_id":{"type":"string","description":"Filter by inventory category id."},"sku":{"type":"string","description":"Filter by exact SKU."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/create_inventory_item":{"post":{"operationId":"foodics_create_inventory_item","summary":"Create Inventory Item","description":"Create a new stock-tracked inventory item in Foodics. Set storage_unit, ingredient_unit and the conversion factor between them.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Inventory item name."},"storage_unit":{"type":"string","minLength":1,"description":"Storage unit, e.g. \"box\" or \"kg\"."},"ingredient_unit":{"type":"string","minLength":1,"description":"Ingredient/consumption unit, e.g. \"gram\"."},"storage_to_ingredient_factor":{"type":"number","exclusiveMinimum":0,"description":"How many ingredient units are in one storage unit."},"sku":{"type":"string","description":"Stock-keeping unit."},"barcode":{"type":"string","description":"Barcode."},"cost":{"type":"number","description":"Unit cost in the account currency."},"category_id":{"type":"string","description":"Inventory category id."}},"required":["name","storage_unit","ingredient_unit","storage_to_ingredient_factor"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/get_inventory_levels":{"post":{"operationId":"foodics_get_inventory_levels","summary":"Get Inventory Levels","description":"Get current on-hand stock levels for every inventory item at one branch in Foodics: quantity and cost per unit.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","minLength":1,"description":"Branch id to read on-hand stock levels for."}},"required":["branch_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_customers":{"post":{"operationId":"foodics_list_customers","summary":"List Customers","description":"List Foodics customers, optionally filtered by exact phone or email. Paginated with page.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"phone":{"type":"string","description":"Filter by exact phone number."},"email":{"type":"string","description":"Filter by exact email."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/create_customer":{"post":{"operationId":"foodics_create_customer","summary":"Create Customer","description":"Create a new customer in Foodics. dial_code is the numeric country code (e.g. 20 Egypt, 966 KSA); phone is digits only.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Customer name."},"phone":{"type":"string","minLength":1,"description":"Customer phone, digits only."},"dial_code":{"type":"integer","description":"Country dial code, e.g. 20 for Egypt, 966 for KSA."},"email":{"type":"string","format":"email","description":"Customer email."},"gender":{"type":"integer","description":"Gender code (1 male, 2 female) if known."},"birth_date":{"type":"string","description":"Birth date YYYY-MM-DD."}},"required":["name","phone","dial_code"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_suppliers":{"post":{"operationId":"foodics_list_suppliers","summary":"List Suppliers","description":"List the inventory suppliers in the Foodics account, optionally filtered by name. Use a returned supplier id when creating a purchase order.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","description":"Filter by supplier name."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/list_purchase_orders":{"post":{"operationId":"foodics_list_purchase_orders","summary":"List Purchase Orders","description":"List Foodics inventory purchase orders, optionally filtered by branch id, supplier id or status code. Paginated with page.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","description":"Filter by branch id."},"supplier_id":{"type":"string","description":"Filter by supplier id."},"status":{"type":"integer","description":"Filter by status code (1 draft, 2 pending, etc.)."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/create_purchase_order":{"post":{"operationId":"foodics_create_purchase_order","summary":"Create Purchase Order","description":"Create an inventory purchase order in Foodics (draft or pending only). Look up branch_id with list_branches, supplier_id with list_suppliers and item ids with list_inventory_items.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","minLength":1,"description":"Branch id receiving the stock."},"supplier_id":{"type":"string","minLength":1,"description":"Supplier id to order from."},"status":{"type":"integer","default":1,"description":"1 draft, 2 pending. Only draft/pending allowed on create."},"notes":{"type":"string","description":"Free-text notes on the PO."},"additional_cost":{"type":"number","description":"Extra cost (shipping, handling) on the whole PO."},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Inventory item id to order."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity in order unit."},"cost":{"type":"number","description":"Unit cost in the account currency."},"unit":{"type":"string","minLength":1,"description":"Order unit, e.g. \"box\"."},"unit_to_storage_factor":{"type":"number","exclusiveMinimum":0,"description":"How many storage units per order unit."}},"required":["id","quantity","cost","unit","unit_to_storage_factor"],"additionalProperties":false},"minItems":1,"description":"Line items to purchase."}},"required":["branch_id","supplier_id","items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/create_order":{"post":{"operationId":"foodics_create_order","summary":"Create Order","description":"Create a Foodics order at a branch with one or more products. type is the order type code (1 dine-in, 2 takeaway, 3 delivery). Look up branch_id with list_branches and product ids with list_products.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"branch_id":{"type":"string","minLength":1,"description":"Branch the order belongs to."},"type":{"type":"integer","description":"Order type code (1 dine-in, 2 takeaway, 3 delivery)."},"products":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","minLength":1,"description":"Foodics product id."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity ordered."},"unit_price":{"type":"number","description":"Override unit price; omit to use catalog price."}},"required":["product_id","quantity"],"additionalProperties":false},"minItems":1,"description":"Line items on the order."},"customer_id":{"type":"string","description":"Foodics customer id, for delivery/loyalty."},"customer_notes":{"type":"string","description":"Notes from the customer."},"kitchen_notes":{"type":"string","description":"Notes for the kitchen."}},"required":["branch_id","type","products"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/foodics/get_account_info":{"post":{"operationId":"foodics_get_account_info","summary":"Get Account Info","description":"Return the authenticated Foodics business: id, name, country, reference, owner email and the OAuth scopes granted to this token.","tags":["foodics"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"description":"No input. Returns the authenticated Foodics business/account.","$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_invoice":{"post":{"operationId":"wafeq_create_invoice","summary":"Create Invoice","description":"Create a Wafeq invoice for a contact with one or more line items. Returns the invoice id and status. Use create_customer first to get a contact id.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact":{"type":"string","minLength":1,"description":"Wafeq contact (customer) id from create_customer."},"currency":{"type":"string","minLength":3,"description":"ISO currency code, e.g. SAR."},"invoice_number":{"type":"string","minLength":1,"description":"Your invoice number."},"invoice_date":{"type":"string","minLength":1,"description":"Issue date, YYYY-MM-DD."},"invoice_due_date":{"type":"string","minLength":1,"description":"Due date, YYYY-MM-DD."},"line_items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"description":"Line item description."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"unit_amount":{"type":"number","description":"Unit price (before tax)."},"account":{"type":"string","description":"Wafeq income account id for the line, if required."},"tax_rate":{"type":"string","description":"Wafeq tax rate id applied to the line, if any."}},"required":["description","quantity","unit_amount"],"additionalProperties":false},"minItems":1,"description":"At least one invoice line item."},"notes":{"type":"string","description":"Optional invoice notes."}},"required":["contact","currency","invoice_number","invoice_date","invoice_due_date","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/get_invoice":{"post":{"operationId":"wafeq_get_invoice","summary":"Get Invoice","description":"Fetch one Wafeq invoice by its id, including status and total.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Wafeq invoice id."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/submit_zatca":{"post":{"operationId":"wafeq_submit_zatca","summary":"Submit ZATCA Invoice","description":"Submit a prepared Wafeq invoice for ZATCA Phase-2 clearance. Wafeq performs the XML canonicalization and certificate signing; this returns the ZATCA clearance UUID and status.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Wafeq invoice id to submit to ZATCA Phase-2 clearance."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_journal_entry":{"post":{"operationId":"wafeq_create_journal_entry","summary":"Create Journal Entry","description":"Post a manual journal in Wafeq. Provide at least two lines; total debits must equal total credits.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"date":{"type":"string","minLength":1,"description":"Posting date, YYYY-MM-DD."},"currency":{"type":"string","minLength":3,"description":"ISO currency code, e.g. SAR."},"reference":{"type":"string","description":"Journal reference / memo."},"lines":{"type":"array","items":{"type":"object","properties":{"account":{"type":"string","minLength":1,"description":"Wafeq account id for this line."},"description":{"type":"string","description":"Line memo."},"debit":{"type":"number","minimum":0,"default":0,"description":"Debit amount."},"credit":{"type":"number","minimum":0,"default":0,"description":"Credit amount."}},"required":["account"],"additionalProperties":false},"minItems":2,"description":"At least two lines; total debits must equal total credits."}},"required":["date","currency","lines"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/list_chart_of_accounts":{"post":{"operationId":"wafeq_list_chart_of_accounts","summary":"List Chart of Accounts","description":"List the Wafeq chart of accounts. Use an account id when posting journal entries or invoice lines.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_customer":{"post":{"operationId":"wafeq_create_customer","summary":"Create Customer","description":"Create a Wafeq contact (customer). Provide a tax registration number for KSA B2B ZATCA invoices. Returns the contact id used by create_invoice.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Customer / contact name."},"email":{"type":"string","format":"email","description":"Customer email."},"phone":{"type":"string","description":"Customer phone."},"tax_registration_number":{"type":"string","description":"VAT / tax registration number (required for KSA B2B ZATCA)."},"currency":{"type":"string","description":"Default currency for the customer, e.g. SAR."}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/list_invoices":{"post":{"operationId":"wafeq_list_invoices","summary":"List Invoices","description":"List Wafeq invoices, optionally filtered by contact, status, project, branch, external id or creation date range. Paginated.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact":{"type":"string","description":"Filter by Wafeq contact id."},"status":{"type":"string","description":"Filter by status, e.g. DRAFT / SENT / FINALIZED."},"project":{"type":"string","description":"Filter by project id."},"branch":{"type":"string","description":"Filter by branch id."},"external_id":{"type":"string","description":"Filter by your external id."},"created_ts_after":{"type":"string","description":"ISO datetime; only invoices created at/after this."},"created_ts_before":{"type":"string","description":"ISO datetime; only invoices created at/before this."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page."},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Results per page (max 200)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/send_invoice":{"post":{"operationId":"wafeq_send_invoice","summary":"Send Invoice","description":"Send a prepared Wafeq invoice to its contact by email. Optionally override the recipient email. Returns the invoice status after sending.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Wafeq invoice id to send."},"email":{"type":"string","format":"email","description":"Override recipient email; defaults to the contact email."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/void_invoice":{"post":{"operationId":"wafeq_void_invoice","summary":"Void Invoice","description":"Void/delete a Wafeq invoice. Only draft invoices can be removed; finalized ones must be credited instead. This cannot be undone.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Wafeq invoice id to void/delete."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_bill":{"post":{"operationId":"wafeq_create_bill","summary":"Create Bill","description":"Create a Wafeq vendor bill (accounts-payable expense) with one or more line items. Returns the bill id and status.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact":{"type":"string","description":"Wafeq contact (vendor) id, if applicable."},"currency":{"type":"string","minLength":3,"description":"ISO currency code, e.g. SAR."},"bill_number":{"type":"string","minLength":1,"description":"Vendor bill number."},"bill_date":{"type":"string","minLength":1,"description":"Issue date, YYYY-MM-DD."},"bill_due_date":{"type":"string","minLength":1,"description":"Due date, YYYY-MM-DD."},"line_items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"description":"Bill line description."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"unit_amount":{"type":"number","description":"Unit price (before tax)."},"account":{"type":"string","description":"Wafeq expense account id for the line."},"tax_rate":{"type":"string","description":"Wafeq tax rate id applied to the line, if any."}},"required":["description","quantity","unit_amount"],"additionalProperties":false},"minItems":1,"description":"At least one bill line item."},"status":{"type":"string","enum":["DRAFT","AUTHORIZED","PAID"],"description":"Bill status; defaults to DRAFT."},"reference":{"type":"string","description":"Optional reference."},"notes":{"type":"string","description":"Optional bill notes."}},"required":["currency","bill_number","bill_date","bill_due_date","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/get_bill":{"post":{"operationId":"wafeq_get_bill","summary":"Get Bill","description":"Fetch one Wafeq vendor bill by its id, including status and total.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"bill_id":{"type":"string","minLength":1,"description":"Wafeq bill id."}},"required":["bill_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/list_bills":{"post":{"operationId":"wafeq_list_bills","summary":"List Bills","description":"List Wafeq vendor bills, optionally filtered by vendor contact or status. Paginated.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact":{"type":"string","description":"Filter by vendor contact id."},"status":{"type":"string","description":"Filter by bill status."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page."},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Results per page (max 200)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/get_contact":{"post":{"operationId":"wafeq_get_contact","summary":"Get Contact","description":"Fetch one Wafeq contact (customer or vendor) by its id, including tax registration number.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"description":"Wafeq contact id."}},"required":["contact_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/list_contacts":{"post":{"operationId":"wafeq_list_contacts","summary":"List Contacts","description":"List Wafeq contacts, optionally filtered by free-text keyword, country code or external id. Paginated.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"keyword":{"type":"string","description":"Free-text search term."},"country":{"type":"string","description":"Filter by country code, e.g. SA / AE / EG."},"external_id":{"type":"string","description":"Filter by your external id."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page."},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Results per page (max 200)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/update_contact":{"post":{"operationId":"wafeq_update_contact","summary":"Update Contact","description":"Update an existing Wafeq contact. Only the supplied fields are changed (PATCH). Returns the updated contact.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"description":"Wafeq contact id to update."},"name":{"type":"string","description":"New contact name."},"email":{"type":"string","format":"email","description":"New email."},"phone":{"type":"string","description":"New phone."},"tax_registration_number":{"type":"string","description":"New VAT / tax registration number."}},"required":["contact_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_product":{"post":{"operationId":"wafeq_create_product","summary":"Create Product","description":"Create a Wafeq product/item that can be reused on invoice and bill line items. Returns the product id.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Product / item name."},"unit_amount":{"type":"number","description":"Default selling unit price."},"description":{"type":"string","description":"Item description."},"account":{"type":"string","description":"Default income account id for this item."},"tax_rate":{"type":"string","description":"Default tax rate id for this item."}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/list_products":{"post":{"operationId":"wafeq_list_products","summary":"List Products","description":"List Wafeq products/items, optionally filtered by a free-text keyword. Paginated.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"keyword":{"type":"string","description":"Free-text search term."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page."},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Results per page (max 200)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_payment":{"post":{"operationId":"wafeq_create_payment","summary":"Create Payment","description":"Record a Wafeq payment received or made, optionally allocating it to specific invoices. Returns the payment id.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0,"description":"Total payment amount including fees."},"currency":{"type":"string","minLength":3,"description":"ISO currency code, e.g. SAR."},"date":{"type":"string","minLength":1,"description":"Payment date, YYYY-MM-DD."},"paid_through_account":{"type":"string","minLength":1,"description":"Wafeq payment account id money moved through."},"contact":{"type":"string","description":"Associated contact id."},"invoice_payments":{"type":"array","items":{"type":"object","properties":{"invoice":{"type":"string","minLength":1,"description":"Wafeq invoice id being paid."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount applied to this invoice."}},"required":["invoice","amount"],"additionalProperties":false},"description":"Allocations of this payment to specific invoices."},"reference":{"type":"string","description":"External reference."}},"required":["amount","currency","date","paid_through_account"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/create_credit_note":{"post":{"operationId":"wafeq_create_credit_note","summary":"Create Credit Note","description":"Create a Wafeq sales credit note for a contact, optionally tied to an existing invoice it offsets. Returns the credit note id.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact":{"type":"string","minLength":1,"description":"Wafeq contact id."},"currency":{"type":"string","minLength":3,"description":"ISO currency code, e.g. SAR."},"credit_note_number":{"type":"string","minLength":1,"description":"Credit note number."},"credit_note_date":{"type":"string","minLength":1,"description":"Issue date, YYYY-MM-DD."},"invoice":{"type":"string","description":"Related Wafeq invoice id this credit note offsets."},"line_items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"description":"Line item description."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"unit_amount":{"type":"number","description":"Unit price (before tax)."},"account":{"type":"string","description":"Wafeq income account id for the line, if required."},"tax_rate":{"type":"string","description":"Wafeq tax rate id applied to the line, if any."}},"required":["description","quantity","unit_amount"],"additionalProperties":false},"minItems":1,"description":"At least one credit note line item."},"notes":{"type":"string","description":"Optional notes."}},"required":["contact","currency","credit_note_number","credit_note_date","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/get_credit_note":{"post":{"operationId":"wafeq_get_credit_note","summary":"Get Credit Note","description":"Fetch one Wafeq credit note by its id, including status and total.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"credit_note_id":{"type":"string","minLength":1,"description":"Wafeq credit note id."}},"required":["credit_note_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/list_tax_rates":{"post":{"operationId":"wafeq_list_tax_rates","summary":"List Tax Rates","description":"List the Wafeq tax/VAT rates. Use a tax rate id on invoice, bill or credit note line items.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page."},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Results per page (max 200)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/get_zatca_status":{"post":{"operationId":"wafeq_get_zatca_status","summary":"Get ZATCA Status","description":"Check the ZATCA Phase-2 clearance status of a Wafeq invoice. Returns the status and clearance UUID Wafeq reports.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Wafeq invoice id to check ZATCA clearance status for."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/wafeq/upload_attachment":{"post":{"operationId":"wafeq_upload_attachment","summary":"Upload Attachment","description":"Upload a base64-encoded file to Wafeq and get an attachment id you can attach to an invoice or bill.","tags":["wafeq"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"description":"Original file name with extension."},"content_base64":{"type":"string","minLength":1,"description":"File contents encoded as base64."},"mime_type":{"type":"string","description":"MIME type, e.g. application/pdf."}},"required":["file_name","content_base64"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/daftra/create_invoice":{"post":{"operationId":"daftra_create_invoice","summary":"Create Invoice","description":"Create a Daftra invoice for a client with one or more line items. Returns the invoice id and number. Use list_customers or create_customer to get a client id.","tags":["daftra"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"client_id":{"type":"string","minLength":1,"description":"Daftra client id (from list_customers / create_customer)."},"invoice_date":{"type":"string","minLength":1,"description":"Issue date, YYYY-MM-DD."},"due_date":{"type":"string","description":"Due date, YYYY-MM-DD."},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","minLength":1,"description":"Line item description."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"unit_price":{"type":"number","description":"Unit price (before tax)."}},"required":["description","quantity","unit_price"],"additionalProperties":false},"minItems":1,"description":"At least one invoice line item."},"notes":{"type":"string","description":"Optional invoice notes."}},"required":["client_id","invoice_date","items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/daftra/get_invoice":{"post":{"operationId":"daftra_get_invoice","summary":"Get Invoice","description":"Fetch one Daftra invoice by its id, including status and total.","tags":["daftra"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Daftra invoice id."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/daftra/list_invoices":{"post":{"operationId":"daftra_list_invoices","summary":"List Invoices","description":"List Daftra invoices, optionally filtered by client id. Paginated with page.","tags":["daftra"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"client_id":{"type":"string","description":"Filter to one Daftra client id."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/daftra/create_journal_entry":{"post":{"operationId":"daftra_create_journal_entry","summary":"Create Journal Entry","description":"Post a manual journal in Daftra. Provide at least two lines; total debits must equal total credits.","tags":["daftra"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"date":{"type":"string","minLength":1,"description":"Posting date, YYYY-MM-DD."},"description":{"type":"string","description":"Journal description / memo."},"lines":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","minLength":1,"description":"Daftra account id for this line."},"description":{"type":"string","description":"Line memo."},"debit":{"type":"number","minimum":0,"default":0,"description":"Debit amount."},"credit":{"type":"number","minimum":0,"default":0,"description":"Credit amount."}},"required":["account_id"],"additionalProperties":false},"minItems":2,"description":"At least two lines; total debits must equal total credits."}},"required":["date","lines"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/daftra/list_customers":{"post":{"operationId":"daftra_list_customers","summary":"List Customers","description":"List Daftra clients (customers). Paginated with page. Use a client id when creating an invoice.","tags":["daftra"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/daftra/create_customer":{"post":{"operationId":"daftra_create_customer","summary":"Create Customer","description":"Create a Daftra client (customer). Returns the client id used by create_invoice.","tags":["daftra"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Client business / person name."},"email":{"type":"string","format":"email","description":"Client email."},"phone":{"type":"string","description":"Client phone."},"tax_number":{"type":"string","description":"Client tax registration number."}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_invoice":{"post":{"operationId":"zoho-books_create_invoice","summary":"Create Invoice","description":"Create a Zoho Books invoice for a customer with one or more line items. Returns the invoice id and number. Use create_customer to get a customer_id first.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","minLength":1,"description":"Zoho contact id (from create_customer)."},"invoice_number":{"type":"string","description":"Invoice number; omit to let Zoho auto-number."},"date":{"type":"string","description":"Issue date, YYYY-MM-DD."},"due_date":{"type":"string","description":"Due date, YYYY-MM-DD."},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Line item name."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"rate":{"type":"number","description":"Unit rate (before tax)."},"account_id":{"type":"string","description":"Zoho income account id for the line, if required."}},"required":["name","quantity","rate"],"additionalProperties":false},"minItems":1,"description":"At least one invoice line item."},"notes":{"type":"string","description":"Optional customer-facing notes."}},"required":["customer_id","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/get_invoice":{"post":{"operationId":"zoho-books_get_invoice","summary":"Get Invoice","description":"Fetch one Zoho Books invoice by its id, including status and total.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Zoho invoice id."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_invoices":{"post":{"operationId":"zoho-books_list_invoices","summary":"List Invoices","description":"List Zoho Books invoices, optionally filtered by customer id or status. Paginated with page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","description":"Filter to one Zoho contact id."},"status":{"type":"string","description":"Filter by status, e.g. 'sent', 'paid', 'overdue'."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_journal_entry":{"post":{"operationId":"zoho-books_create_journal_entry","summary":"Create Journal Entry","description":"Post a journal in Zoho Books. Provide at least two lines; total debits must equal total credits.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"journal_date":{"type":"string","minLength":1,"description":"Posting date, YYYY-MM-DD."},"reference_number":{"type":"string","description":"Journal reference number."},"notes":{"type":"string","description":"Journal notes / memo."},"line_items":{"type":"array","items":{"type":"object","properties":{"account_id":{"type":"string","minLength":1,"description":"Zoho account id for this line."},"description":{"type":"string","description":"Line memo."},"debit_or_credit":{"type":"string","enum":["debit","credit"],"description":"Whether this line is a debit or a credit."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Line amount (positive)."}},"required":["account_id","debit_or_credit","amount"],"additionalProperties":false},"minItems":2,"description":"At least two lines; total debits must equal total credits."}},"required":["journal_date","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_chart_of_accounts":{"post":{"operationId":"zoho-books_list_chart_of_accounts","summary":"List Chart of Accounts","description":"List the Zoho Books chart of accounts. Use an account id when posting journal entries or invoice lines.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number for pagination."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_customer":{"post":{"operationId":"zoho-books_create_customer","summary":"Create Customer","description":"Create a Zoho Books contact (customer). Returns the contact id used by create_invoice.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Contact display name."},"email":{"type":"string","format":"email","description":"Primary contact email."},"phone":{"type":"string","description":"Contact phone."},"currency_code":{"type":"string","description":"Default currency code, e.g. SAR."}},"required":["name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/email_invoice":{"post":{"operationId":"zoho-books_email_invoice","summary":"Email Invoice","description":"Email a Zoho Books invoice to the customer. Omit to_mail_ids to use the contact's emails on file.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Zoho invoice id to email."},"to_mail_ids":{"type":"array","items":{"type":"string","format":"email"},"description":"Recipient emails; omit to use the contact's emails on file."},"subject":{"type":"string","description":"Email subject override."},"body":{"type":"string","description":"Email body override."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/mark_invoice_sent":{"post":{"operationId":"zoho-books_mark_invoice_sent","summary":"Mark Invoice Sent","description":"Mark a draft Zoho Books invoice as 'sent' without emailing it (e.g. when it was delivered out of band).","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Zoho invoice id."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/void_invoice":{"post":{"operationId":"zoho-books_void_invoice","summary":"Void Invoice","description":"Void a Zoho Books invoice. The invoice is kept for audit but excluded from receivables. This cannot be undone.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Zoho invoice id."}},"required":["invoice_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/get_customer":{"post":{"operationId":"zoho-books_get_customer","summary":"Get Customer","description":"Fetch one Zoho Books contact (customer or vendor) by its contact id.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"description":"Zoho contact id."}},"required":["contact_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/update_customer":{"post":{"operationId":"zoho-books_update_customer","summary":"Update Customer","description":"Update a Zoho Books contact. Only the fields you pass are changed (name, email, phone, currency).","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"description":"Zoho contact id to update."},"name":{"type":"string","description":"New display/company name."},"email":{"type":"string","format":"email","description":"New primary email."},"phone":{"type":"string","description":"New primary phone."},"currency_code":{"type":"string","description":"New default currency code."}},"required":["contact_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_customers":{"post":{"operationId":"zoho-books_list_customers","summary":"List Customers","description":"List Zoho Books contacts, optionally filtered to customers or vendors. Paginated with page/per_page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact_type":{"type":"string","enum":["customer","vendor"],"description":"Filter to customers or vendors."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."},"per_page":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Rows per page (Zoho max 200)."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/delete_customer":{"post":{"operationId":"zoho-books_delete_customer","summary":"Delete Customer","description":"Delete a Zoho Books contact. Fails if the contact has transactions. This cannot be undone.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contact_id":{"type":"string","minLength":1,"description":"Zoho contact id to delete."}},"required":["contact_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_item":{"post":{"operationId":"zoho-books_create_item","summary":"Create Item","description":"Create a Zoho Books item (product/service) with a name and selling rate. Returns the item id used in invoice/estimate line items.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Item name."},"rate":{"type":"number","description":"Selling price (unit rate)."},"description":{"type":"string","description":"Item description."},"sku":{"type":"string","description":"Stock keeping unit / product code."},"account_id":{"type":"string","description":"Income account id (from list_chart_of_accounts)."}},"required":["name","rate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_items":{"post":{"operationId":"zoho-books_list_items","summary":"List Items","description":"List Zoho Books items (products/services). Paginated with page/per_page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."},"per_page":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Rows per page."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_estimate":{"post":{"operationId":"zoho-books_create_estimate","summary":"Create Estimate","description":"Create a Zoho Books estimate (quote) for a customer with line items. Returns the estimate id and number.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","minLength":1,"description":"Zoho contact id."},"estimate_number":{"type":"string","description":"Estimate number; omit to auto-number."},"date":{"type":"string","description":"Estimate date, YYYY-MM-DD."},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Line item name."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"rate":{"type":"number","description":"Unit rate (before tax)."},"account_id":{"type":"string","description":"Zoho income account id for the line, if required."}},"required":["name","quantity","rate"],"additionalProperties":false},"minItems":1,"description":"At least one estimate line item."},"notes":{"type":"string","description":"Customer-facing notes."}},"required":["customer_id","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_estimates":{"post":{"operationId":"zoho-books_list_estimates","summary":"List Estimates","description":"List Zoho Books estimates, optionally filtered by customer id or status. Paginated with page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","description":"Filter to one contact id."},"status":{"type":"string","description":"Filter by status."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_bill":{"post":{"operationId":"zoho-books_create_bill","summary":"Create Bill","description":"Record a vendor bill (accounts payable) in Zoho Books with line items. Returns the bill id and number.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"vendor_id":{"type":"string","minLength":1,"description":"Zoho vendor contact id."},"bill_number":{"type":"string","minLength":1,"description":"Vendor's bill number."},"date":{"type":"string","description":"Bill date, YYYY-MM-DD."},"due_date":{"type":"string","description":"Due date, YYYY-MM-DD."},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Line item name."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"rate":{"type":"number","description":"Unit rate (before tax)."},"account_id":{"type":"string","description":"Zoho income account id for the line, if required."}},"required":["name","quantity","rate"],"additionalProperties":false},"minItems":1,"description":"At least one bill line."},"reference_number":{"type":"string","description":"External reference."}},"required":["vendor_id","bill_number","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_bills":{"post":{"operationId":"zoho-books_list_bills","summary":"List Bills","description":"List Zoho Books vendor bills, optionally filtered by vendor id or status. Paginated with page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"vendor_id":{"type":"string","description":"Filter to one vendor id."},"status":{"type":"string","description":"Filter by status."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_expense":{"post":{"operationId":"zoho-books_create_expense","summary":"Create Expense","description":"Record an expense in Zoho Books. Needs the expense account id and the paid-through (cash/bank) account id. Get account ids from list_chart_of_accounts.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"account_id":{"type":"string","minLength":1,"description":"Expense account id (from list_chart_of_accounts)."},"paid_through_account_id":{"type":"string","minLength":1,"description":"Account the expense was paid through (cash/bank)."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Expense amount."},"date":{"type":"string","minLength":1,"description":"Expense date, YYYY-MM-DD."},"vendor_id":{"type":"string","description":"Vendor contact id."},"customer_id":{"type":"string","description":"Customer id for a billable expense."},"description":{"type":"string","description":"Expense description."},"reference_number":{"type":"string","description":"Reference number."}},"required":["account_id","paid_through_account_id","amount","date"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_expenses":{"post":{"operationId":"zoho-books_list_expenses","summary":"List Expenses","description":"List Zoho Books expenses. Paginated with page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_customer_payment":{"post":{"operationId":"zoho-books_create_customer_payment","summary":"Create Customer Payment","description":"Record a customer payment in Zoho Books and optionally apply it to one or more invoices (invoice_id + amount_applied).","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","minLength":1,"description":"Zoho contact id paying."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Total payment amount."},"date":{"type":"string","minLength":1,"description":"Payment date, YYYY-MM-DD."},"payment_mode":{"type":"string","default":"cash","description":"Payment mode, e.g. cash, banktransfer, check."},"reference_number":{"type":"string","description":"Reference number."},"description":{"type":"string","description":"Payment memo."},"invoices":{"type":"array","items":{"type":"object","properties":{"invoice_id":{"type":"string","minLength":1,"description":"Invoice the payment applies to."},"amount_applied":{"type":"number","exclusiveMinimum":0,"description":"Amount of this payment applied to that invoice."}},"required":["invoice_id","amount_applied"],"additionalProperties":false},"description":"Invoices to apply this payment to (id + amount_applied)."}},"required":["customer_id","amount","date"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_customer_payments":{"post":{"operationId":"zoho-books_list_customer_payments","summary":"List Customer Payments","description":"List Zoho Books customer payments, optionally filtered by customer id. Paginated with page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","description":"Filter to one contact id."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/create_credit_note":{"post":{"operationId":"zoho-books_create_credit_note","summary":"Create Credit Note","description":"Create a Zoho Books credit note for a customer with line items. Returns the credit note id and number.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","minLength":1,"description":"Zoho contact id."},"creditnote_number":{"type":"string","description":"Credit note number; omit to auto-number."},"date":{"type":"string","description":"Credit note date, YYYY-MM-DD."},"line_items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Line item name."},"quantity":{"type":"number","exclusiveMinimum":0,"description":"Quantity for the line."},"rate":{"type":"number","description":"Unit rate (before tax)."},"account_id":{"type":"string","description":"Zoho income account id for the line, if required."}},"required":["name","quantity","rate"],"additionalProperties":false},"minItems":1,"description":"At least one credit note line."},"notes":{"type":"string","description":"Customer-facing notes."}},"required":["customer_id","line_items"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_credit_notes":{"post":{"operationId":"zoho-books_list_credit_notes","summary":"List Credit Notes","description":"List Zoho Books credit notes, optionally filtered by customer id. Paginated with page.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","description":"Filter to one contact id."},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_taxes":{"post":{"operationId":"zoho-books_list_taxes","summary":"List Taxes","description":"List the configured taxes in Zoho Books. Use a tax id when adding tax to invoice/estimate lines.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/zoho-books/list_organizations":{"post":{"operationId":"zoho-books_list_organizations","summary":"List Organizations","description":"List every Zoho Books organization this connection can access. Use an organization_id to wire a connection.","tags":["zoho-books"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/create_payment_intent":{"post":{"operationId":"paymob_create_payment_intent","summary":"Create Payment Intent","description":"Create a Paymob payment intention and return the hosted Unified Checkout URL to send the customer to. Amount is in piasters (EGP * 100). Does not move money by itself.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":0,"description":"Amount in piasters (EGP * 100). 1000 = 10.00 EGP."},"currency":{"type":"string","default":"EGP","description":"ISO currency, EGP for Egypt."},"paymentMethods":{"type":"array","items":{"anyOf":[{"type":"integer"},{"type":"string"}]},"minItems":1,"description":"Paymob integration ids (or method slugs) to offer."},"billingData":{"type":"object","additionalProperties":{},"description":"Paymob billing_data object (first_name, last_name, email, phone_number, ...)."},"items":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Line items: name, amount, description, quantity."},"specialReference":{"type":"string","description":"Your unique merchant order reference (idempotency)."}},"required":["amountCents","paymentMethods","billingData"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/create_payment_link":{"post":{"operationId":"paymob_create_payment_link","summary":"Create Payment Link","description":"Create a Paymob payment intention via the modern Intention API and return a shareable hosted-checkout payment link you can send to a customer over WhatsApp/SMS/email. Amount is in piasters (EGP * 100). Optionally set expiresAfterSeconds. Creating the link does not move money by itself.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":0,"description":"Amount in piasters (EGP * 100). 1000 = 10.00 EGP."},"currency":{"type":"string","default":"EGP","description":"ISO currency, EGP for Egypt."},"paymentMethods":{"type":"array","items":{"anyOf":[{"type":"integer"},{"type":"string"}]},"minItems":1,"description":"Paymob integration ids (or method slugs) to offer."},"billingData":{"type":"object","additionalProperties":{},"description":"Paymob billing_data (first_name, last_name, email, phone_number)."},"items":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Line items: name, amount, description, quantity."},"specialReference":{"type":"string","description":"Your unique merchant order reference (idempotency)."},"expiresAfterSeconds":{"type":"integer","exclusiveMinimum":0,"description":"Optional link expiry in seconds."}},"required":["amountCents","paymentMethods","billingData"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/charge_card":{"post":{"operationId":"paymob_charge_card","summary":"Charge Card","description":"Charge a previously tokenized Paymob card (MOTO / saved token) for the given amount in piasters. This moves real money — always confirm with the user first.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amountCents":{"type":"integer","exclusiveMinimum":0,"description":"Amount in piasters."},"paymentToken":{"type":"string","minLength":1,"description":"Paymob payment_key/token for the card to charge (MOTO/saved)."}},"required":["amountCents","paymentToken"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/capture_transaction":{"post":{"operationId":"paymob_capture_transaction","summary":"Capture Transaction","description":"Capture (settle) a previously authorized Paymob card transaction for an amount in piasters (<= the authorized amount). Only valid for auth-flow transactions that have not yet been captured or voided. This finalizes the charge and moves real money — always confirm with the user first.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"description":"Paymob auth transaction id to capture."},"amountCents":{"type":"integer","exclusiveMinimum":0,"description":"Amount to capture in piasters (<= authorized amount)."}},"required":["transactionId","amountCents"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/void_transaction":{"post":{"operationId":"paymob_void_transaction","summary":"Void Transaction","description":"Void (cancel) an authorized but not-yet-captured Paymob card transaction, releasing the hold on the customer's card. Use this instead of refund when the auth has NOT been captured yet. Cannot be undone — always confirm first.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"description":"Paymob auth transaction id to void (uncaptured only)."}},"required":["transactionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/refund_transaction":{"post":{"operationId":"paymob_refund_transaction","summary":"Refund Transaction","description":"Refund a captured Paymob transaction, fully or partially (amount in piasters). This returns real money to the customer and cannot be undone — always confirm first.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"description":"Paymob transaction id to refund."},"amountCents":{"type":"integer","exclusiveMinimum":0,"description":"Amount to refund in piasters (<= captured amount)."}},"required":["transactionId","amountCents"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/list_transactions":{"post":{"operationId":"paymob_list_transactions","summary":"List Transactions","description":"List Paymob transactions for the merchant account, paginated. Read-only.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page."},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Results per page."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/get_transaction":{"post":{"operationId":"paymob_get_transaction","summary":"Get Transaction","description":"Look up a single Paymob transaction by id and return its full object plus success/pending flags and amount (in piasters). Use this to confirm the real outcome of a payment after a callback, instead of trusting the redirect alone. Read-only, no money movement.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"description":"Paymob transaction id (the `id` from a callback `obj`)."}},"required":["transactionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/get_order":{"post":{"operationId":"paymob_get_order","summary":"Get Order","description":"Retrieve a Paymob order by id. Returns the full order plus amount_cents and paid_amount_cents (both in piasters), so you can reconcile how much of an order has actually been paid. Read-only.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Paymob order id (the `order` / `order.id` from a callback)."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/get_payment_methods":{"post":{"operationId":"paymob_get_payment_methods","summary":"Get Payment Methods","description":"List the payment methods/integrations available for an existing Paymob intention, given its client_secret (from create_payment_intent / create_payment_link). Use this to show the customer which methods (card, wallet, kiosk, installments) they can pay with. Read-only.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"clientSecret":{"type":"string","minLength":1,"description":"The intention client_secret returned by create_payment_intent."}},"required":["clientSecret"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/verify_hmac":{"post":{"operationId":"paymob_verify_hmac","summary":"Verify HMAC","description":"Verify a Paymob transaction callback's HMAC-SHA512 signature against the connection's HMAC secret. Use this before trusting any Paymob webhook/redirect. Purely local — no network, no money movement.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"hmac":{"type":"string","minLength":1,"description":"The `hmac` query/value Paymob sent."},"obj":{"type":"object","additionalProperties":{},"description":"The Paymob transaction `obj` (flattened): keys include amount_cents, created_at, currency, error_occured, has_parent_transaction, id, integration_id, is_3d_secure, is_auth, is_capture, is_refunded, is_standalone_payment, is_voided, order, owner, pending, source_data_pan, source_data_sub_type, source_data_type, success."}},"required":["hmac","obj"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paymob/verify_token_hmac":{"post":{"operationId":"paymob_verify_token_hmac","summary":"Verify Card-Token HMAC","description":"Verify the HMAC-SHA512 signature of a Paymob CARD-TOKEN callback (sent when a customer's card is saved/tokenized). This uses a different field set than a transaction callback — use verify_hmac for transaction callbacks and this for token callbacks. Always verify before storing a saved-card token. Purely local — no network, no money movement.","tags":["paymob"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"hmac":{"type":"string","minLength":1,"description":"The `hmac` Paymob sent with the token callback."},"obj":{"type":"object","additionalProperties":{},"description":"The Paymob card-token `obj`: keys card_subtype, created_at, email, id, masked_pan, merchant_id, order_id, token."}},"required":["hmac","obj"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/meta-marketing/list_campaigns":{"post":{"operationId":"meta-marketing_list_campaigns","summary":"List Campaigns","description":"List Meta ad campaigns for the connected ad account, optionally filtered by effective status.","tags":["meta-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"effectiveStatus":{"type":"string","description":"Filter, e.g. 'ACTIVE','PAUSED'. Omit for all."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":25,"description":"Page size."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/meta-marketing/pause_campaign":{"post":{"operationId":"meta-marketing_pause_campaign","summary":"Pause Campaign","description":"Pause a Meta ad campaign (sets status PAUSED). Stops spend; confirm before running.","tags":["meta-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Meta campaign id."}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/meta-marketing/get_ad_insights":{"post":{"operationId":"meta-marketing_get_ad_insights","summary":"Get Ad Insights","description":"Fetch Meta insights (spend, impressions, ROAS, etc.) for a campaign/adset/ad over a date preset.","tags":["meta-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"nodeId":{"type":"string","minLength":1,"description":"Campaign/adset/ad id (or act_<id>) to report on."},"datePreset":{"type":"string","default":"last_7d","description":"Meta date_preset, e.g. 'last_7d','last_30d','today'."},"level":{"type":"string","enum":["account","campaign","adset","ad"],"default":"campaign","description":"Aggregation level."}},"required":["nodeId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/meta-marketing/create_ad":{"post":{"operationId":"meta-marketing_create_ad","summary":"Create Ad","description":"Create a Meta ad under an existing ad set using an existing creative. Defaults to PAUSED. Confirm before running.","tags":["meta-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Ad name."},"adsetId":{"type":"string","minLength":1,"description":"Parent ad set id."},"creativeId":{"type":"string","minLength":1,"description":"Existing creative id to use."},"status":{"type":"string","enum":["ACTIVE","PAUSED"],"default":"PAUSED","description":"Create paused unless explicitly ACTIVE."}},"required":["name","adsetId","creativeId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/meta-marketing/update_budget":{"post":{"operationId":"meta-marketing_update_budget","summary":"Update Budget","description":"Update a Meta campaign/ad set daily budget (minor units). Changes spend; confirm before running.","tags":["meta-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Campaign (or ad set) id."},"dailyBudgetCents":{"type":"integer","exclusiveMinimum":0,"description":"New daily budget in minor units (e.g. piasters)."}},"required":["campaignId","dailyBudgetCents"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/meta-marketing/list_audiences":{"post":{"operationId":"meta-marketing_list_audiences","summary":"List Audiences","description":"List Meta custom audiences for the connected ad account.","tags":["meta-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":25}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/send_text":{"post":{"operationId":"whatsapp_send_text","summary":"Send Text","description":"Send a plain WhatsApp text message. Outside the 24-hour customer service window only template messages are allowed.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"to":{"type":"string","minLength":6,"description":"Recipient in international format, digits only (e.g. 2010...)."},"body":{"type":"string","minLength":1,"description":"Message text (<=4096 chars)."},"previewUrl":{"type":"boolean","default":false,"description":"Render link previews for URLs in the body."}},"required":["to","body"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/send_template":{"post":{"operationId":"whatsapp_send_template","summary":"Send Template","description":"Send an approved WhatsApp template message (the only way to message a user outside the 24h window).","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"to":{"type":"string","minLength":6,"description":"Recipient in international format, digits only (e.g. 2010...)."},"templateName":{"type":"string","minLength":1,"description":"Approved template name."},"languageCode":{"type":"string","default":"en","description":"Template language, e.g. 'en','ar'."},"components":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Template components (header/body/button params)."}},"required":["to","templateName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/send_media":{"post":{"operationId":"whatsapp_send_media","summary":"Send Media","description":"Send an image, video, document, or audio message by public URL.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"to":{"type":"string","minLength":6,"description":"Recipient in international format, digits only (e.g. 2010...)."},"type":{"type":"string","enum":["image","video","document","audio"],"description":"Media type."},"link":{"type":"string","format":"uri","description":"Public URL of the media. Provide either link or mediaId."},"mediaId":{"type":"string","description":"Previously uploaded media id (from upload_media). Provide either link or mediaId."},"caption":{"type":"string","description":"Caption (image/video/document)."},"filename":{"type":"string","description":"Display filename for documents."}},"required":["to","type"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/send_interactive":{"post":{"operationId":"whatsapp_send_interactive","summary":"Send Interactive","description":"Send an interactive WhatsApp message (reply buttons or a list). Pass the full interactive object.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"to":{"type":"string","minLength":6,"description":"Recipient in international format, digits only (e.g. 2010...)."},"interactive":{"type":"object","additionalProperties":{},"description":"Full WhatsApp interactive object (button or list)."}},"required":["to","interactive"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/mark_as_read":{"post":{"operationId":"whatsapp_mark_as_read","summary":"Mark As Read","description":"Mark an inbound WhatsApp message as read (blue ticks).","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"messageId":{"type":"string","minLength":1,"description":"wamid of the inbound message."}},"required":["messageId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/list_templates":{"post":{"operationId":"whatsapp_list_templates","summary":"List Templates","description":"List the WhatsApp message templates on the business account with their approval status.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":25}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/get_business_profile":{"post":{"operationId":"whatsapp_get_business_profile","summary":"Get Business Profile","description":"Fetch the WhatsApp business profile (about, address, description, website, vertical).","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/upload_media":{"post":{"operationId":"whatsapp_upload_media","summary":"Upload Media","description":"Fetch a file from a public URL and upload it to WhatsApp, returning a reusable media id you can pass to send_media (avoids re-hosting).","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public URL of the file to fetch and upload to WhatsApp."},"mimeType":{"type":"string","minLength":3,"description":"MIME type, e.g. 'image/jpeg', 'application/pdf'."},"filename":{"type":"string","description":"Optional filename Meta stores with the asset."}},"required":["url","mimeType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/get_media_url":{"post":{"operationId":"whatsapp_get_media_url","summary":"Get Media URL","description":"Resolve a WhatsApp media id (from an inbound message or upload) to a short-lived authenticated download URL plus its metadata.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"Media id from an inbound message or upload."}},"required":["mediaId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/download_media":{"post":{"operationId":"whatsapp_download_media","summary":"Download Media","description":"Download the binary content behind a WhatsApp media id and return it base64-encoded (resolves the authenticated URL internally).","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"Media id to download."}},"required":["mediaId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/delete_media":{"post":{"operationId":"whatsapp_delete_media","summary":"Delete Media","description":"Permanently delete an uploaded media asset from Meta storage by its media id.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"mediaId":{"type":"string","minLength":1,"description":"Media id to delete from Meta storage."}},"required":["mediaId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/whatsapp/parse_webhook":{"post":{"operationId":"whatsapp_parse_webhook","summary":"Parse Webhook","description":"Parse a raw WhatsApp Cloud API webhook body into typed inbound message events and message status events (sent/delivered/read/failed). Pure transform, makes no network call.","tags":["whatsapp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payload":{"anyOf":[{"type":"string"},{"type":"object","additionalProperties":{}}],"description":"Raw webhook body (string or already-parsed object)."}},"required":["payload"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/openwa/send_alert":{"post":{"operationId":"openwa_send_alert","summary":"Send Alert","description":"Send a WhatsApp alert/notification to one recipient (a phone number or a WhatsApp id). UNOFFICIAL WhatsApp automation — for low-volume B2B/internal alerts to known recipients only. Do NOT use for bulk or marketing/B2C messaging: abnormal volume or unsolicited sends will get the linked number banned.","tags":["openwa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"to":{"type":"string","minLength":5,"description":"Recipient: phone in international format, digits only (e.g. 2010...), or a full WhatsApp id (…@c.us for a person, …@g.us for a group)."},"text":{"type":"string","minLength":1,"maxLength":4096,"description":"Alert text. Keep it transactional — this is not for marketing."}},"required":["to","text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/openwa/send_group_alert":{"post":{"operationId":"openwa_send_group_alert","summary":"Send Group Alert","description":"Send a WhatsApp alert to a group (e.g. an internal ops/on-call group). groupId must end in @g.us. UNOFFICIAL WhatsApp automation — for low-volume B2B/internal alerts to known recipients only. Do NOT use for bulk or marketing/B2C messaging: abnormal volume or unsolicited sends will get the linked number banned.","tags":["openwa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"groupId":{"type":"string","minLength":5,"description":"WhatsApp group id, ending in @g.us (e.g. 12036...@g.us)."},"text":{"type":"string","minLength":1,"maxLength":4096,"description":"Alert text for the group."}},"required":["groupId","text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/openwa/get_session_status":{"post":{"operationId":"openwa_get_session_status","summary":"Get Session Status","description":"Check whether the linked WhatsApp session is connected and ready to send. Use this before sending if delivery matters.","tags":["openwa"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/myfatoorah/initiate_payment":{"post":{"operationId":"myfatoorah_initiate_payment","summary":"Initiate Payment","description":"List the enabled MyFatoorah payment methods and their service charges for an amount. Read-only — does not create an invoice or move money. Use the returned PaymentMethodId with execute_payment.","tags":["myfatoorah"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"invoiceAmount":{"type":"number","exclusiveMinimum":0,"description":"Transaction amount after discounts/taxes, e.g. 25.5."},"currencyIso":{"type":"string","minLength":3,"maxLength":3,"default":"KWD","description":"ISO currency code, e.g. KWD, SAR, AED, EGP."}},"required":["invoiceAmount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/myfatoorah/execute_payment":{"post":{"operationId":"myfatoorah_execute_payment","summary":"Execute Payment","description":"Create a MyFatoorah invoice for the chosen PaymentMethodId and return the PaymentURL to send the customer to. Creates a payable invoice — confirm with the user first.","tags":["myfatoorah"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentMethodId":{"type":"integer","exclusiveMinimum":0,"description":"PaymentMethodId from initiate_payment (e.g. KNET, Visa/Master)."},"invoiceValue":{"type":"number","exclusiveMinimum":0,"description":"Amount to charge the customer."},"customerName":{"type":"string","description":"Customer full name shown on the invoice."},"customerEmail":{"type":"string","format":"email","description":"Customer email for the receipt."},"customerMobile":{"type":"string","description":"Customer mobile (digits only, no country code)."},"callBackUrl":{"type":"string","format":"uri","description":"Success redirect URL MyFatoorah appends paymentId to."},"errorUrl":{"type":"string","format":"uri","description":"Failure redirect URL."},"customerReference":{"type":"string","description":"Your merchant order reference (idempotency / reconciliation)."},"displayCurrencyIso":{"type":"string","description":"Currency to display to the customer, e.g. KWD."}},"required":["paymentMethodId","invoiceValue"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/myfatoorah/get_payment_status":{"post":{"operationId":"myfatoorah_get_payment_status","summary":"Get Payment Status","description":"Look up a MyFatoorah invoice/payment status by InvoiceId or PaymentId. Read-only. Returns InvoiceStatus (Paid/Pending/Failed/Expired) and the transaction attempts.","tags":["myfatoorah"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The InvoiceId or PaymentId value to inquire about."},"keyType":{"type":"string","enum":["InvoiceId","PaymentId"],"default":"InvoiceId","description":"Which identifier `key` is."}},"required":["key"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/myfatoorah/refund_payment":{"post":{"operationId":"myfatoorah_refund_payment","summary":"Refund Payment","description":"Refund a captured MyFatoorah payment fully or partially. This returns real money to the customer and cannot be undone — always confirm first.","tags":["myfatoorah"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"The InvoiceId or PaymentId to refund."},"keyType":{"type":"string","enum":["InvoiceId","PaymentId"],"default":"InvoiceId","description":"Which identifier `key` is."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to refund (<= captured amount). Real money out."},"comment":{"type":"string","description":"Optional refund reason stored on MyFatoorah."}},"required":["key","amount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paytabs/create_payment_page":{"post":{"operationId":"paytabs_create_payment_page","summary":"Create Payment Page","description":"Create a PayTabs hosted payment page and return the redirect URL to send the customer to. Creates a payable transaction — confirm with the user first. Does not capture money by itself.","tags":["paytabs"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cartId":{"type":"string","minLength":1,"description":"Your unique merchant cart/order id (idempotency)."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Cart amount in the major currency unit, e.g. 49.99."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO currency, e.g. SAR, AED, EGP."},"description":{"type":"string","minLength":1,"description":"Short cart description shown on the hosted page."},"callbackUrl":{"type":"string","format":"uri","description":"Server-to-server IPN callback URL."},"returnUrl":{"type":"string","format":"uri","description":"Browser redirect URL after payment."},"customer":{"type":"object","additionalProperties":{},"description":"PayTabs customer_details object (name, email, phone, street1, city, country, ...)."},"paymentMethods":{"type":"array","items":{"type":"string"},"description":"Restrict methods, e.g. [\"creditcard\"]. Omit for all enabled."}},"required":["cartId","amount","currency","description"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paytabs/query_transaction":{"post":{"operationId":"paytabs_query_transaction","summary":"Query Transaction","description":"Query a PayTabs transaction by tran_ref and return its payment_result (response_status: A=Authorised, D=Declined, P=Pending, ...). Read-only.","tags":["paytabs"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"tranRef":{"type":"string","minLength":1,"description":"PayTabs tran_ref returned by create_payment_page."}},"required":["tranRef"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/paytabs/refund_transaction":{"post":{"operationId":"paytabs_refund_transaction","summary":"Refund Transaction","description":"Refund a captured PayTabs transaction (by tran_ref), fully or partially. This returns real money to the customer and cannot be undone — always confirm first.","tags":["paytabs"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"tranRef":{"type":"string","minLength":1,"description":"PayTabs tran_ref of the captured sale to refund."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to refund (<= captured). Real money out."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO currency, must match the original sale."},"cartId":{"type":"string","minLength":1,"description":"A cart id for the refund record (idempotency)."},"reason":{"type":"string","description":"Refund description stored on PayTabs."}},"required":["tranRef","amount","currency","cartId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cashu/create_payment":{"post":{"operationId":"cashu_create_payment","summary":"Create Payment","description":"Create a CashU payment and return the hosted payment page URL to send the payer to. Request is HMAC-signed with the merchant secret word. Creates a payable transaction — confirm with the user first.","tags":["cashu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Your unique merchant order id (idempotency)."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount in the major currency unit, e.g. 100.00."},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"USD","description":"ISO currency code, e.g. USD, EGP, SAR, AED."},"description":{"type":"string","minLength":1,"description":"Short order description shown to the payer."},"returnUrl":{"type":"string","format":"uri","description":"Browser redirect URL after the payer completes/aborts."},"notifyUrl":{"type":"string","format":"uri","description":"Server-to-server IPN URL CashU posts the result to."},"customerEmail":{"type":"string","format":"email","description":"Payer email for the receipt."}},"required":["orderId","amount","description"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cashu/verify_payment":{"post":{"operationId":"cashu_verify_payment","summary":"Verify Payment","description":"Check a CashU payment's status by transaction id and verify the response signature against the merchant secret word (shared @wassel/core HMAC). Read-only, no money movement.","tags":["cashu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"description":"CashU transaction id returned by create_payment."},"orderId":{"type":"string","description":"Optional merchant order id for cross-checking."}},"required":["transactionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cashu/refund_payment":{"post":{"operationId":"cashu_refund_payment","summary":"Refund Payment","description":"Refund a captured CashU payment fully or partially. Request is HMAC-signed with the merchant secret word. This returns real money to the payer and cannot be undone — always confirm first.","tags":["cashu"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"description":"CashU transaction id of the captured payment to refund."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to refund (<= captured). Real money out."},"reason":{"type":"string","description":"Refund reason stored on CashU."}},"required":["transactionId","amount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/aramex/create_shipment":{"post":{"operationId":"aramex_create_shipment","summary":"Create Shipment","description":"Create an Aramex shipment (AWB) between a shipper and a consignee. Returns the AWB number and label URL. Use get_rates first to confirm pricing. Set codAmount to the cash-on-delivery amount, or 0 if prepaid.","tags":["aramex"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"reference":{"type":"string","description":"Your internal order reference, echoed back on the shipment"},"shipper":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Contact person full name"},"companyName":{"type":"string","description":"Company name, optional for residential"},"phone":{"type":"string","minLength":1,"description":"Contact phone number including country code"},"cellPhone":{"type":"string","description":"Mobile number, optional but recommended for SMS updates"},"email":{"type":"string","format":"email","description":"Contact email, optional"},"line1":{"type":"string","minLength":1,"description":"Street address line 1"},"line2":{"type":"string","description":"Street address line 2, optional"},"city":{"type":"string","minLength":1,"description":"City name, e.g. Dubai, Riyadh, Cairo"},"stateProvince":{"type":"string","description":"State or province code, optional"},"postalCode":{"type":"string","description":"Postal code, optional"},"countryCode":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code, e.g. AE, SA, EG, JO"}},"required":["name","phone","line1","city","countryCode"],"additionalProperties":false,"description":"Pickup/origin party"},"consignee":{"type":"object","properties":{"name":{"$ref":"#/properties/shipper/properties/name"},"companyName":{"$ref":"#/properties/shipper/properties/companyName"},"phone":{"$ref":"#/properties/shipper/properties/phone"},"cellPhone":{"$ref":"#/properties/shipper/properties/cellPhone"},"email":{"$ref":"#/properties/shipper/properties/email"},"line1":{"$ref":"#/properties/shipper/properties/line1"},"line2":{"$ref":"#/properties/shipper/properties/line2"},"city":{"$ref":"#/properties/shipper/properties/city"},"stateProvince":{"$ref":"#/properties/shipper/properties/stateProvince"},"postalCode":{"$ref":"#/properties/shipper/properties/postalCode"},"countryCode":{"$ref":"#/properties/shipper/properties/countryCode"}},"required":["name","phone","line1","city","countryCode"],"additionalProperties":false,"description":"Delivery/destination party"},"details":{"type":"object","properties":{"actualWeightKg":{"type":"number","exclusiveMinimum":0,"description":"Actual gross weight of the shipment in kilograms"},"numberOfPieces":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Number of physical pieces in the shipment"},"productGroup":{"type":"string","enum":["EXP","DOM"],"default":"EXP","description":"EXP = express/international, DOM = domestic"},"productType":{"type":"string","minLength":1,"description":"Aramex product type code, e.g. PPX, PDX, OND, CDS"},"paymentType":{"type":"string","enum":["P","C","3"],"default":"P","description":"P = prepaid, C = collect, 3 = third party"},"descriptionOfGoods":{"type":"string","minLength":1,"description":"Plain description of the goods being shipped"},"goodsOriginCountry":{"type":"string","minLength":2,"maxLength":2,"description":"ISO alpha-2 origin country of the goods"},"codAmount":{"type":"number","minimum":0,"default":0,"description":"Cash-on-delivery amount, 0 if prepaid"},"codCurrency":{"type":"string","minLength":3,"maxLength":3,"default":"AED","description":"ISO currency code for the COD amount, e.g. AED, SAR, EGP"},"customsValue":{"type":"number","minimum":0,"description":"Declared customs value for international shipments, optional"}},"required":["actualWeightKg","productType","descriptionOfGoods","goodsOriginCountry"],"additionalProperties":false,"description":"Shipment weight and product info"}},"required":["shipper","consignee","details"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/aramex/track_shipment":{"post":{"operationId":"aramex_track_shipment","summary":"Track Shipment","description":"Get the status and scan history of an Aramex shipment by its AWB number.","tags":["aramex"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"awbNumber":{"type":"string","minLength":1,"description":"Aramex AWB / shipment number to track"}},"required":["awbNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/aramex/get_rates":{"post":{"operationId":"aramex_get_rates","summary":"Get Rates","description":"Estimate the Aramex shipping charge between an origin and destination before creating a shipment. Returns the total amount and currency.","tags":["aramex"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"origin":{"type":"object","properties":{"city":{"type":"string","minLength":1,"description":"Origin city"},"countryCode":{"type":"string","minLength":2,"maxLength":2,"description":"Origin ISO alpha-2 country code"},"postalCode":{"type":"string","description":"Origin postal code, optional"}},"required":["city","countryCode"],"additionalProperties":false},"destination":{"type":"object","properties":{"city":{"type":"string","minLength":1,"description":"Destination city"},"countryCode":{"type":"string","minLength":2,"maxLength":2,"description":"Destination ISO alpha-2 country code"},"postalCode":{"type":"string","description":"Destination postal code, optional"}},"required":["city","countryCode"],"additionalProperties":false},"weightKg":{"type":"number","exclusiveMinimum":0,"default":1,"description":"Chargeable weight in kilograms"},"numberOfPieces":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Number of pieces"},"productGroup":{"type":"string","enum":["EXP","DOM"],"default":"EXP","description":"EXP = express/international, DOM = domestic"},"productType":{"type":"string","minLength":1,"description":"Aramex product type code, e.g. PPX, OND"},"paymentType":{"type":"string","enum":["P","C","3"],"default":"P","description":"P = prepaid, C = collect, 3 = third party"}},"required":["origin","destination","productType"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/aramex/schedule_pickup":{"post":{"operationId":"aramex_schedule_pickup","summary":"Schedule Pickup","description":"Schedule an Aramex courier pickup for ready shipments. Returns the pickup confirmation id and scheduled date.","tags":["aramex"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"pickupDate":{"type":"string","minLength":1,"description":"Requested pickup date, ISO date e.g. 2026-05-20"},"readyTime":{"type":"string","minLength":1,"description":"Earliest time the shipment is ready, HH:mm e.g. 10:00"},"lastPickupTime":{"type":"string","minLength":1,"description":"Latest pickup time, HH:mm e.g. 17:00"},"closingTime":{"type":"string","minLength":1,"description":"Location closing time, HH:mm e.g. 18:00"},"pickupLocation":{"type":"string","minLength":1,"description":"Free-text description of where to collect, e.g. Reception"},"contact":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Contact person full name"},"companyName":{"type":"string","description":"Company name, optional for residential"},"phone":{"type":"string","minLength":1,"description":"Contact phone number including country code"},"cellPhone":{"type":"string","description":"Mobile number, optional but recommended for SMS updates"},"email":{"type":"string","format":"email","description":"Contact email, optional"},"line1":{"type":"string","minLength":1,"description":"Street address line 1"},"line2":{"type":"string","description":"Street address line 2, optional"},"city":{"type":"string","minLength":1,"description":"City name, e.g. Dubai, Riyadh, Cairo"},"stateProvince":{"type":"string","description":"State or province code, optional"},"postalCode":{"type":"string","description":"Postal code, optional"},"countryCode":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code, e.g. AE, SA, EG, JO"}},"required":["name","phone","line1","city","countryCode"],"additionalProperties":false,"description":"Pickup contact and address"},"numberOfPieces":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"Total pieces to be collected"},"totalWeightKg":{"type":"number","exclusiveMinimum":0,"default":1,"description":"Total weight to be collected, kilograms"}},"required":["pickupDate","readyTime","lastPickupTime","closingTime","pickupLocation","contact"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mylerz/create_shipment":{"post":{"operationId":"mylerz_create_shipment","summary":"Create Shipment","description":"Create a Mylerz delivery order within Egypt. Returns the barcode (tracking number) and status. Set cod to the cash-on-delivery amount in EGP, or 0 if prepaid.","tags":["mylerz"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer":{"type":"object","properties":{"fullName":{"type":"string","minLength":1,"description":"Recipient full name as on the AWB"},"phone":{"type":"string","pattern":"^01[0-9]{9}$","description":"Recipient phone, 11-digit Egyptian format"},"email":{"type":"string","format":"email","description":"Recipient email, optional"}},"required":["fullName","phone"],"additionalProperties":false},"dropOffAddress":{"type":"object","properties":{"governorate":{"type":"string","minLength":1,"description":"Governorate name, e.g. Cairo"},"city":{"type":"string","minLength":1,"description":"City / area within the governorate"},"neighborhood":{"type":"string","description":"Neighborhood or district, optional"},"line1":{"type":"string","minLength":1,"description":"Street and building address"}},"required":["governorate","city","line1"],"additionalProperties":false},"cod":{"type":"number","minimum":0,"maximum":50000,"description":"Cash-on-delivery amount in EGP. 0 if prepaid."},"packageCount":{"type":"integer","exclusiveMinimum":0,"maximum":10,"default":1,"description":"Number of packages in the order"},"weightKg":{"type":"number","exclusiveMinimum":0,"default":1,"description":"Total package weight in kilograms"},"description":{"type":"string","minLength":1,"description":"What is being shipped"},"serviceType":{"type":"string","enum":["Delivery","Exchange","CashCollection","ReturnPickup"],"default":"Delivery","description":"Mylerz service type. Default Delivery for a normal outbound."},"merchantReference":{"type":"string","description":"Your internal order ID, echoed back on the shipment"}},"required":["customer","dropOffAddress","cod","description"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mylerz/track_shipment":{"post":{"operationId":"mylerz_track_shipment","summary":"Track Shipment","description":"Get the status and status history of a Mylerz shipment by its barcode / tracking number.","tags":["mylerz"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Mylerz barcode / tracking number"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mylerz/cancel_shipment":{"post":{"operationId":"mylerz_cancel_shipment","summary":"Cancel Shipment","description":"Cancel a Mylerz shipment before it has been picked up. This cannot be undone.","tags":["mylerz"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"description":"Tracking number of the shipment to cancel before pickup"}},"required":["trackingNumber"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mylerz/get_rates":{"post":{"operationId":"mylerz_get_rates","summary":"Get Rates","description":"Estimate the Mylerz shipping cost for a destination governorate before creating a shipment. Returns shipping cost and any COD fee in EGP.","tags":["mylerz"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"governorate":{"type":"string","minLength":1,"description":"Destination governorate"},"cod":{"type":"number","minimum":0,"default":0,"description":"Cash-on-delivery amount in EGP for the fee estimate"},"weightKg":{"type":"number","exclusiveMinimum":0,"default":1,"description":"Package weight in kilograms"}},"required":["governorate"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/talabat/list_orders":{"post":{"operationId":"talabat_list_orders","summary":"List Orders","description":"List Talabat orders for the connected vendor within a time window. Returns a page of order summaries for reconciliation or processing.","tags":["talabat"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"startTime":{"type":"string","description":"ISO 8601 lower bound on order creation, default today 00:00"},"endTime":{"type":"string","description":"ISO 8601 upper bound on order creation, default now"},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":500,"default":20,"description":"Page size, 1-500"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/talabat/get_order":{"post":{"operationId":"talabat_get_order","summary":"Get Order","description":"Fetch the full detail of a single Talabat order by its order id, including customer, items and totals.","tags":["talabat"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Talabat order id to fetch"}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/talabat/update_order_status":{"post":{"operationId":"talabat_update_order_status","summary":"Update Order Status","description":"Move a Talabat order to a new status: READY_FOR_PICKUP, DISPATCHED, or CANCELLED. CANCELLED requires a cancellationReason. This changes a live order.","tags":["talabat"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"Talabat order id to update"},"status":{"type":"string","enum":["READY_FOR_PICKUP","DISPATCHED","CANCELLED"],"description":"Target order status. READY_FOR_PICKUP = picking/packing done; DISPATCHED = handed to delivery; CANCELLED = order cancelled (reason required)."},"cancellationReason":{"type":"string","description":"Required when status is CANCELLED. Free-text reason."}},"required":["orderId","status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/talabat/get_menu":{"post":{"operationId":"talabat_get_menu","summary":"Get Menu","description":"Retrieve the connected Talabat vendor's catalog / menu products, with optional search and active-only filtering. Returns a page of products.","tags":["talabat"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"queryTerm":{"type":"string","description":"Search by product name, SKU or barcode"},"locale":{"type":"string","description":"Locale for translations, e.g. en_GB, ar_EG"},"isActive":{"type":"boolean","description":"Filter to only active or only inactive products"},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":500,"default":50,"description":"Page size, 1-500"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fta-uae/submit_invoice":{"post":{"operationId":"fta-uae_submit_invoice","summary":"Submit e-Invoice","description":"Submit one already-signed Peppol / PINT AE e-invoice document to the UAE Federal Tax Authority via its Accredited Service Provider. The document must already carry its cryptographic signature; Wassel does not sign in V1 (the caller's ERP or ASP signs it). Returns the FTA document id and status.","tags":["fta-uae"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"document":{"type":"object","additionalProperties":{},"description":"The already-signed Peppol / PINT AE e-invoice document object. Must already carry its cryptographic signature; Wassel does not sign for you in V1. The caller's ERP or Accredited Service Provider signs it."},"documentFormat":{"type":"string","enum":["pint-ae","ubl","xml-base64"],"default":"pint-ae","description":"Format of the supplied document. 'pint-ae' is the UAE Peppol PINT profile; 'xml-base64' for a base64-wrapped signed XML payload."}},"required":["document"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fta-uae/get_document":{"post":{"operationId":"fta-uae_get_document","summary":"Get e-Invoice Document","description":"Fetch one e-invoice document from the UAE Federal Tax Authority by its FTA document id, including FTA clearance/validation status and the full document JSON.","tags":["fta-uae"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"documentId":{"type":"string","minLength":1,"description":"FTA / ASP document id returned by submit_invoice."}},"required":["documentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/fta-uae/cancel_document":{"post":{"operationId":"fta-uae_cancel_document","summary":"Cancel e-Invoice Document","description":"Request cancellation of a submitted e-invoice at the UAE Federal Tax Authority. Subject to the FTA's cancellation window and rules. Irreversible from Wassel's side; confirm before running.","tags":["fta-uae"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"documentId":{"type":"string","minLength":1,"description":"FTA / ASP document id of the invoice to cancel."},"reason":{"type":"string","minLength":1,"description":"Cancellation reason recorded with the FTA (required)."}},"required":["documentId","reason"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-shop/list_orders":{"post":{"operationId":"tiktok-shop_list_orders","summary":"List Orders","description":"List TikTok Shop orders for the authorized shop, optionally filtered by status and creation time window. Paginated via an opaque page token.","tags":["tiktok-shop"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderStatus":{"type":"string","description":"Filter by TikTok Shop order status, e.g. UNPAID, AWAITING_SHIPMENT, IN_TRANSIT, DELIVERED, COMPLETED, CANCELLED."},"createTimeGe":{"type":"integer","description":"Unix seconds; orders created at or after this time."},"createTimeLt":{"type":"integer","description":"Unix seconds; orders created strictly before this time."},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Orders per page (TikTok Shop caps at 100)."},"pageToken":{"type":"string","description":"Opaque pagination cursor from a previous page."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-shop/get_order":{"post":{"operationId":"tiktok-shop_get_order","summary":"Get Order","description":"Fetch one TikTok Shop order by its order id, including status and the full order JSON.","tags":["tiktok-shop"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"TikTok Shop order id."}},"required":["orderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-shop/update_order_status":{"post":{"operationId":"tiktok-shop_update_order_status","summary":"Update Order Status","description":"Mark a TikTok Shop order as shipped by attaching its tracking number and shipping provider. This is a real fulfillment action against the live shop — confirm before running.","tags":["tiktok-shop"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderId":{"type":"string","minLength":1,"description":"TikTok Shop order id to fulfill."},"trackingNumber":{"type":"string","minLength":1,"description":"Carrier tracking number for the shipment."},"shippingProviderId":{"type":"string","minLength":1,"description":"TikTok Shop shipping provider id for the carrier."}},"required":["orderId","trackingNumber","shippingProviderId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-shop/list_products":{"post":{"operationId":"tiktok-shop_list_products","summary":"List Products","description":"List TikTok Shop products for the authorized shop, optionally filtered by status. Paginated via an opaque page token.","tags":["tiktok-shop"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by product status, e.g. ACTIVATE, DRAFT, DEACTIVATED, FROZEN."},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Products per page (TikTok Shop caps at 100)."},"pageToken":{"type":"string","description":"Opaque pagination cursor from a previous page."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tiktok-shop/update_inventory":{"post":{"operationId":"tiktok-shop_update_inventory","summary":"Update Inventory","description":"Set the absolute available stock for one SKU of a TikTok Shop product in a given warehouse. This changes live sellable stock — confirm before running.","tags":["tiktok-shop"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"productId":{"type":"string","minLength":1,"description":"TikTok Shop product id whose SKU stock to update."},"skuId":{"type":"string","minLength":1,"description":"TikTok Shop SKU id within the product."},"warehouseId":{"type":"string","minLength":1,"description":"TikTok Shop warehouse id the stock applies to."},"quantity":{"type":"integer","minimum":0,"description":"Absolute available quantity to set for the SKU."}},"required":["productId","skuId","warehouseId","quantity"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/gameball/create_player":{"post":{"operationId":"gameball_create_player","summary":"Create Player","description":"Create or upsert a Gameball player (customer) by your unique id, with optional profile and custom attributes. Safe to call repeatedly; Gameball upserts.","tags":["gameball"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"playerUniqueId":{"type":"string","minLength":1,"description":"Your unique customer identifier (e.g. your DB user id)"},"playerAttributes":{"type":"object","properties":{"displayName":{"type":"string","description":"Customer display name shown in Gameball"},"email":{"type":"string","format":"email","description":"Customer email"},"mobile":{"type":"string","description":"Customer mobile number"},"gender":{"type":"string","enum":["M","F"],"description":"Customer gender, M or F"},"dateOfBirth":{"type":"string","description":"ISO date of birth, e.g. 1990-01-31"},"joinDate":{"type":"string","description":"ISO date the customer joined your platform"}},"additionalProperties":false,"description":"Optional profile attributes for the player"},"customAttributes":{"type":"object","additionalProperties":{},"description":"Arbitrary custom attributes (key/value) for segmentation"}},"required":["playerUniqueId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/gameball/send_event":{"post":{"operationId":"gameball_send_event","summary":"Send Event","description":"Submit one or more behavioural events for a player (e.g. purchase, signup) so Gameball can trigger rewards and segmentation. Pass events as a map of event name to a metadata object.","tags":["gameball"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"playerUniqueId":{"type":"string","minLength":1,"description":"The player unique id the event belongs to"},"events":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{}},"description":"Map of event name -> metadata object, e.g. { purchase: { totalAmount: 100 } }"},"playerAttributes":{"type":"object","additionalProperties":{},"description":"Optional player attributes to upsert alongside the event"}},"required":["playerUniqueId","events"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/gameball/get_player":{"post":{"operationId":"gameball_get_player","summary":"Get Player","description":"Fetch a Gameball player's loyalty profile by your unique id, including points balance and tier when available.","tags":["gameball"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"playerUniqueId":{"type":"string","minLength":1,"description":"The player unique id to fetch"}},"required":["playerUniqueId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/gameball/redeem_points":{"post":{"operationId":"gameball_redeem_points","summary":"Redeem Points","description":"Redeem a player's Gameball points against a monetary amount (e.g. apply points as a discount at checkout). Pass a unique transactionId for idempotency.","tags":["gameball"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"playerUniqueId":{"type":"string","minLength":1,"description":"The player redeeming points"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Monetary value to redeem points against"},"transactionId":{"type":"string","minLength":1,"description":"Your unique idempotency id for this redemption"},"reference":{"type":"string","description":"Optional human reference, e.g. order number"}},"required":["playerUniqueId","amount","transactionId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/gameball/send_action":{"post":{"operationId":"gameball_send_action","summary":"Send Action","description":"Trigger a configured Gameball action/challenge for a player by name (e.g. complete profile, leave a review) to grant the configured reward.","tags":["gameball"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"playerUniqueId":{"type":"string","minLength":1,"description":"The player the action is for"},"actionName":{"type":"string","minLength":1,"description":"The configured action/challenge name to trigger"},"metadata":{"type":"object","additionalProperties":{},"description":"Optional metadata for the action"}},"required":["playerUniqueId","actionName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/klaviyo/track_event":{"post":{"operationId":"klaviyo_track_event","summary":"Track Event","description":"Record a customer event in Klaviyo (e.g. Placed Order, Viewed Product) against a profile identified by email, phone, or external id. Drives flows and segmentation.","tags":["klaviyo"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"metricName":{"type":"string","minLength":1,"description":"The Klaviyo metric/event name, e.g. 'Placed Order'"},"email":{"type":"string","format":"email","description":"Profile email; provide email or phoneNumber"},"phoneNumber":{"type":"string","description":"Profile phone in E.164, e.g. +201001234567"},"externalId":{"type":"string","description":"Your external profile id, optional"},"properties":{"type":"object","additionalProperties":{},"description":"Arbitrary event properties (e.g. order total, items)"},"value":{"type":"number","description":"Numeric event value, e.g. order revenue"},"time":{"type":"string","description":"ISO 8601 event timestamp; defaults to now if omitted"}},"required":["metricName"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/klaviyo/upsert_profile":{"post":{"operationId":"klaviyo_upsert_profile","summary":"Upsert Profile","description":"Create or update a Klaviyo profile by email, phone, or external id, setting names and custom properties. Idempotent: Klaviyo merges on the identifier.","tags":["klaviyo"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Profile email; provide at least one identifier"},"phoneNumber":{"type":"string","description":"Profile phone in E.164 format"},"externalId":{"type":"string","description":"Your external profile id"},"firstName":{"type":"string","description":"Profile first name"},"lastName":{"type":"string","description":"Profile last name"},"properties":{"type":"object","additionalProperties":{},"description":"Custom profile properties to set"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/klaviyo/list_profiles":{"post":{"operationId":"klaviyo_list_profiles","summary":"List Profiles","description":"List Klaviyo profiles, optionally filtered with a JSON:API filter expression. Cursor-paginated; pass nextCursor back as pageCursor for the next page.","tags":["klaviyo"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"filter":{"type":"string","description":"Klaviyo JSON:API filter, e.g. equals(email,\"a@b.com\"). Optional."},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"pageCursor":{"type":"string","description":"Opaque cursor from a previous page's links.next"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/klaviyo/subscribe_profile":{"post":{"operationId":"klaviyo_subscribe_profile","summary":"Subscribe Profile","description":"Subscribe a profile to a Klaviyo list with explicit consent (email and/or SMS). Use only with genuine opt-in; this records marketing consent.","tags":["klaviyo"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"listId":{"type":"string","minLength":1,"description":"The Klaviyo list id to subscribe the profile to"},"email":{"type":"string","format":"email","description":"Email to subscribe; provide email or phoneNumber"},"phoneNumber":{"type":"string","description":"Phone (E.164) to subscribe to SMS"},"consentedAt":{"type":"string","description":"ISO 8601 timestamp of explicit consent, optional"}},"required":["listId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/klaviyo/get_metric":{"post":{"operationId":"klaviyo_get_metric","summary":"Get Metric","description":"Fetch a Klaviyo metric by id, returning its name and the integration that created it. Use to resolve metric ids before reporting.","tags":["klaviyo"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"metricId":{"type":"string","minLength":1,"description":"The Klaviyo metric id (not the name)"}},"required":["metricId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mailchimp/add_member":{"post":{"operationId":"mailchimp_add_member","summary":"Add Member","description":"Add an email address to a Mailchimp audience with a status and optional merge fields/tags. Use status 'pending' for double opt-in.","tags":["mailchimp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"audienceId":{"type":"string","minLength":1,"description":"The Mailchimp audience (list) id to add the member to"},"email":{"type":"string","format":"email","description":"Member email address"},"status":{"type":"string","enum":["subscribed","unsubscribed","cleaned","pending","transactional"],"description":"Initial status; use 'pending' for double opt-in","default":"subscribed"},"mergeFields":{"type":"object","additionalProperties":{},"description":"Merge fields, e.g. { FNAME: 'Mona', LNAME: 'Hassan' }"},"tags":{"type":"array","items":{"type":"string"},"description":"Tags to apply to the new member"}},"required":["audienceId","email"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mailchimp/update_member":{"post":{"operationId":"mailchimp_update_member","summary":"Update Member","description":"Update an existing Mailchimp audience member (status and/or merge fields), located by email. Does not create the member if missing.","tags":["mailchimp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"audienceId":{"type":"string","minLength":1,"description":"The audience id the member belongs to"},"email":{"type":"string","format":"email","description":"Member email (used to locate the subscriber hash)"},"status":{"type":"string","enum":["subscribed","unsubscribed","cleaned","pending","transactional"],"description":"New status, optional"},"mergeFields":{"type":"object","additionalProperties":{},"description":"Merge fields to update"}},"required":["audienceId","email"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mailchimp/list_audiences":{"post":{"operationId":"mailchimp_list_audiences","summary":"List Audiences","description":"List Mailchimp audiences (lists) on the account with member counts. Paginated with count/offset.","tags":["mailchimp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"count":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"default":20,"description":"Number of audiences to return, max 1000"},"offset":{"type":"integer","minimum":0,"default":0,"description":"Zero-based offset for pagination"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mailchimp/create_campaign":{"post":{"operationId":"mailchimp_create_campaign","summary":"Create Campaign","description":"Create a regular Mailchimp email campaign targeting an audience, with subject, from name and reply-to. Optionally sets HTML content. The campaign is saved, not sent.","tags":["mailchimp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"audienceId":{"type":"string","minLength":1,"description":"Target audience id for the campaign"},"subjectLine":{"type":"string","minLength":1,"description":"Email subject line"},"fromName":{"type":"string","minLength":1,"description":"Sender display name"},"replyTo":{"type":"string","format":"email","description":"Reply-to email address"},"title":{"type":"string","description":"Internal campaign title (not shown to recipients)"},"htmlContent":{"type":"string","description":"Optional HTML body to set on the campaign content"}},"required":["audienceId","subjectLine","fromName","replyTo"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mailchimp/send_campaign":{"post":{"operationId":"mailchimp_send_campaign","summary":"Send Campaign","description":"Send a previously created Mailchimp campaign immediately to its audience. This delivers email to real recipients — confirm before running.","tags":["mailchimp"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"The campaign id to send immediately"}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/activecampaign/create_contact":{"post":{"operationId":"activecampaign_create_contact","summary":"Create Contact","description":"Create an ActiveCampaign contact by email with optional name and phone. Returns the contact id. ActiveCampaign rejects duplicates by email.","tags":["activecampaign"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Contact email address (required)"},"firstName":{"type":"string","description":"Contact first name"},"lastName":{"type":"string","description":"Contact last name"},"phone":{"type":"string","description":"Contact phone number"}},"required":["email"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/activecampaign/update_contact":{"post":{"operationId":"activecampaign_update_contact","summary":"Update Contact","description":"Update an existing ActiveCampaign contact's name or phone by contact id. Does not create the contact if missing.","tags":["activecampaign"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contactId":{"type":"string","minLength":1,"description":"The ActiveCampaign contact id to update"},"firstName":{"type":"string","description":"New first name"},"lastName":{"type":"string","description":"New last name"},"phone":{"type":"string","description":"New phone number"}},"required":["contactId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/activecampaign/add_tag":{"post":{"operationId":"activecampaign_add_tag","summary":"Add Tag","description":"Associate an existing tag (by tag id) with an ActiveCampaign contact. Resolve tag names to ids beforehand.","tags":["activecampaign"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contactId":{"type":"string","minLength":1,"description":"The contact id to tag"},"tagId":{"type":"string","minLength":1,"description":"The numeric tag id to apply (resolve names beforehand)"}},"required":["contactId","tagId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/activecampaign/add_contact_to_automation":{"post":{"operationId":"activecampaign_add_contact_to_automation","summary":"Add Contact To Automation","description":"Enroll an ActiveCampaign contact into an automation by automation id. The contact starts at the automation's entry point.","tags":["activecampaign"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"contactId":{"type":"string","minLength":1,"description":"The contact id to enroll"},"automationId":{"type":"string","minLength":1,"description":"The automation id to add the contact into"}},"required":["contactId","automationId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/activecampaign/list_campaigns":{"post":{"operationId":"activecampaign_list_campaigns","summary":"List Campaigns","description":"List ActiveCampaign email campaigns with id, name and status. Paginated with limit/offset.","tags":["activecampaign"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Page size, max 100"},"offset":{"type":"integer","minimum":0,"default":0,"description":"Zero-based offset for pagination"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/slack/post_message":{"post":{"operationId":"slack_post_message","summary":"Post Message","description":"Post a message to a Slack channel or DM. Pass thread_ts to reply inside an existing thread. The bot must be a member of the target channel.","tags":["slack"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel id (C…), user id (U…) for a DM, or #channel name"},"text":{"type":"string","minLength":1,"description":"Message text. Supports Slack mrkdwn formatting."},"thread_ts":{"type":"string","description":"Parent message ts to reply in a thread, optional"}},"required":["channel","text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/slack/upload_file":{"post":{"operationId":"slack_upload_file","summary":"Upload File","description":"Upload a text file to one or more Slack channels with optional title and intro comment. The bot must be a member of each target channel.","tags":["slack"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"channels":{"type":"string","minLength":1,"description":"Comma-separated channel ids to share the file into"},"content":{"type":"string","minLength":1,"description":"Inline UTF-8 file content to upload"},"filename":{"type":"string","minLength":1,"default":"upload.txt","description":"File name shown in Slack"},"title":{"type":"string","description":"Title of the file, optional"},"initial_comment":{"type":"string","description":"Message text introducing the file, optional"}},"required":["channels","content"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/slack/list_channels":{"post":{"operationId":"slack_list_channels","summary":"List Channels","description":"List Slack conversations the bot can see. Filter by types (public_channel, private_channel, mpim, im). Paginated via next_cursor.","tags":["slack"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"types":{"type":"string","default":"public_channel","description":"Comma-separated channel types: public_channel, private_channel, mpim, im"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"default":100,"description":"Max channels to return (1-1000)"},"cursor":{"type":"string","description":"Pagination cursor from a previous response_metadata"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/slack/get_user":{"post":{"operationId":"slack_get_user","summary":"Get User","description":"Fetch a Slack user's profile by user id. Email is only returned when the bot token has the users:read.email scope and the email is visible.","tags":["slack"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"user":{"type":"string","minLength":1,"description":"Slack user id, e.g. U012ABC3DEF"}},"required":["user"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/slack/add_reaction":{"post":{"operationId":"slack_add_reaction","summary":"Add Reaction","description":"Add an emoji reaction to a Slack message. Pass the message channel id and its ts (timestamp), plus the emoji name without colons.","tags":["slack"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"channel":{"type":"string","minLength":1,"description":"Channel id the message is in"},"timestamp":{"type":"string","minLength":1,"description":"ts of the message to react to (from post_message)"},"name":{"type":"string","minLength":1,"description":"Emoji name without colons, e.g. thumbsup"}},"required":["channel","timestamp","name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/airtable/list_records":{"post":{"operationId":"airtable_list_records","summary":"List Records","description":"List records in an Airtable table. Scope with base_id + table. Optionally filter by view or filterByFormula. Paginated via the offset token.","tags":["airtable"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"base_id":{"type":"string","minLength":1,"description":"Airtable base id, starts with \"app\", e.g. appXXXXXXXXXXXXXX"},"table":{"type":"string","minLength":1,"description":"Table name or table id (tblXXXXXXXXXXXXXX)"},"view":{"type":"string","description":"View name or id to apply its filters/sort, optional"},"filterByFormula":{"type":"string","description":"Airtable formula to filter rows, optional"},"maxRecords":{"type":"integer","exclusiveMinimum":0,"maximum":1000,"description":"Hard cap on records returned across pages, optional"},"pageSize":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":100,"description":"Records per page (max 100)"},"offset":{"type":"string","description":"Pagination offset token from a previous response"}},"required":["base_id","table"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/airtable/get_record":{"post":{"operationId":"airtable_get_record","summary":"Get Record","description":"Fetch a single Airtable record by id. Scope with base_id + table.","tags":["airtable"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"base_id":{"type":"string","minLength":1,"description":"Airtable base id, starts with \"app\", e.g. appXXXXXXXXXXXXXX"},"table":{"type":"string","minLength":1,"description":"Table name or table id (tblXXXXXXXXXXXXXX)"},"record_id":{"type":"string","minLength":1,"description":"Record id to fetch (rec…)"}},"required":["base_id","table","record_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/airtable/create_record":{"post":{"operationId":"airtable_create_record","summary":"Create Record","description":"Create a record in an Airtable table. Scope with base_id + table. fields is a field-name to value map; set typecast to let Airtable coerce strings.","tags":["airtable"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"base_id":{"type":"string","minLength":1,"description":"Airtable base id, starts with \"app\", e.g. appXXXXXXXXXXXXXX"},"table":{"type":"string","minLength":1,"description":"Table name or table id (tblXXXXXXXXXXXXXX)"},"fields":{"type":"object","additionalProperties":{},"description":"Field name → value map for the new record"},"typecast":{"type":"boolean","default":false,"description":"Let Airtable best-effort coerce string values to field types"}},"required":["base_id","table","fields"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/airtable/update_record":{"post":{"operationId":"airtable_update_record","summary":"Update Record","description":"Partially update an Airtable record by id (PATCH — fields you do not list are left unchanged). Scope with base_id + table.","tags":["airtable"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"base_id":{"type":"string","minLength":1,"description":"Airtable base id, starts with \"app\", e.g. appXXXXXXXXXXXXXX"},"table":{"type":"string","minLength":1,"description":"Table name or table id (tblXXXXXXXXXXXXXX)"},"record_id":{"type":"string","minLength":1,"description":"Record id to update (rec…)"},"fields":{"type":"object","additionalProperties":{},"description":"Field name → new value map. Unlisted fields are left as-is."},"typecast":{"type":"boolean","default":false,"description":"Let Airtable best-effort coerce string values to field types"}},"required":["base_id","table","record_id","fields"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/airtable/delete_record":{"post":{"operationId":"airtable_delete_record","summary":"Delete Record","description":"Delete an Airtable record by id. This cannot be undone. Scope with base_id + table.","tags":["airtable"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"base_id":{"type":"string","minLength":1,"description":"Airtable base id, starts with \"app\", e.g. appXXXXXXXXXXXXXX"},"table":{"type":"string","minLength":1,"description":"Table name or table id (tblXXXXXXXXXXXXXX)"},"record_id":{"type":"string","minLength":1,"description":"Record id to delete (rec…)"}},"required":["base_id","table","record_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/youtube/list_videos":{"post":{"operationId":"youtube_list_videos","summary":"List Videos","description":"List YouTube videos either by explicit comma-separated ids, or by channel_id (most recent uploads, optionally filtered by q). Paginated via nextPageToken.","tags":["youtube"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"ids":{"type":"string","description":"Comma-separated video ids to fetch directly. Mutually exclusive with channel_id."},"channel_id":{"type":"string","description":"Channel id whose recent uploads to list (search.list order=date). Used when ids is omitted."},"q":{"type":"string","description":"Free-text search query when listing by channel/search"},"maxResults":{"type":"integer","exclusiveMinimum":0,"maximum":50,"default":25,"description":"Max results (1-50)"},"pageToken":{"type":"string","description":"Pagination token from a previous response"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/youtube/get_channel":{"post":{"operationId":"youtube_get_channel","summary":"Get Channel","description":"Fetch a YouTube channel's snippet and statistics. Pass channel_id, or mine=true for the authenticated user's own channel.","tags":["youtube"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"channel_id":{"type":"string","description":"Channel id (UC…). Omit with mine=true to use the OAuth user."},"mine":{"type":"boolean","default":false,"description":"True to fetch the authenticated user's own channel"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/youtube/get_video_stats":{"post":{"operationId":"youtube_get_video_stats","summary":"Get Video Stats","description":"Fetch view / like / comment counts for a single YouTube video by id.","tags":["youtube"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"video_id":{"type":"string","minLength":1,"description":"Video id to fetch statistics for"}},"required":["video_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/youtube/list_comments":{"post":{"operationId":"youtube_list_comments","summary":"List Comments","description":"List top-level comment threads on a YouTube video. Paginated via nextPageToken. Returns author, text, like count and publish time.","tags":["youtube"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"video_id":{"type":"string","minLength":1,"description":"Video id whose comment threads to list"},"maxResults":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Max comment threads (1-100)"},"pageToken":{"type":"string","description":"Pagination token from a previous response"}},"required":["video_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/jahez/list_orders":{"post":{"operationId":"jahez_list_orders","summary":"List Orders","description":"List delivery orders for the connected Jahez restaurant. Filter by status or date range. Returns order summaries with customer info and totals.","tags":["jahez"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by order status: pending, accepted, preparing, ready, picked_up, delivered, cancelled"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Orders per page, max 100"},"date_from":{"type":"string","description":"Filter orders created on or after this date (YYYY-MM-DD)"},"date_to":{"type":"string","description":"Filter orders created on or before this date (YYYY-MM-DD)"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/jahez/get_order":{"post":{"operationId":"jahez_get_order","summary":"Get Order","description":"Retrieve full detail for one Jahez order: line items, delivery address, payment method, subtotal, delivery fee, and discount.","tags":["jahez"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"order_id":{"type":"string","minLength":1,"description":"Jahez order id"}},"required":["order_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/jahez/update_order_status":{"post":{"operationId":"jahez_update_order_status","summary":"Update Order Status","description":"Move a Jahez order to a new status: accept (confirm receipt), reject, preparing, ready (for pickup by driver), picked_up, or cancel. A cancellation_reason is required when rejecting or cancelling.","tags":["jahez"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"order_id":{"type":"string","minLength":1,"description":"Jahez order id to update"},"status":{"type":"string","enum":["accepted","rejected","preparing","ready","picked_up","cancelled"],"description":"New status: accepted (confirm order), rejected, preparing, ready (ready for pickup), picked_up, cancelled"},"cancellation_reason":{"type":"string","description":"Required when status is rejected or cancelled. Free-text reason."},"estimated_preparation_minutes":{"type":"integer","exclusiveMinimum":0,"description":"Estimated preparation time in minutes, used when accepting."}},"required":["order_id","status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/jahez/get_restaurant_info":{"post":{"operationId":"jahez_get_restaurant_info","summary":"Get Restaurant Info","description":"Retrieve the connected Jahez restaurant's profile: name, status, is_open flag, city, phone, and average rating.","tags":["jahez"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/jahez/list_menu_items":{"post":{"operationId":"jahez_list_menu_items","summary":"List Menu Items","description":"List the menu items for the connected Jahez restaurant. Optionally filter by category_id or availability status.","tags":["jahez"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"category_id":{"type":"string","description":"Filter by menu category id"},"is_available":{"type":"boolean","description":"Filter by availability status"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":50,"description":"Items per page"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/create_customer":{"post":{"operationId":"lean_create_customer","summary":"Create Customer","description":"Register a new Lean customer entity. Returns the customer_id that identifies this user in all subsequent Data and Payments API calls. The user must still link their bank account via the Lean Connect SDK before data or payments can be initiated.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"app_user_id":{"type":"string","minLength":1,"description":"Your internal identifier for this user (stored in Lean for cross-referencing)."}},"required":["app_user_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/get_identity":{"post":{"operationId":"lean_get_identity","summary":"Get Identity","description":"Retrieve the account-holder identity data (name, date of birth, national ID, phone, address) for a Lean entity. The entity must have previously linked their bank account and granted the identity permission via the Lean Connect SDK.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"entity_id":{"type":"string","minLength":1,"description":"Lean entity / customer UUID (returned after the user links their bank via Lean Connect SDK)."}},"required":["entity_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/list_accounts":{"post":{"operationId":"lean_list_accounts","summary":"List Bank Accounts","description":"List all bank accounts the Lean entity has consented to share. Returns account_id values needed for get_balance and list_transactions calls.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"entity_id":{"type":"string","minLength":1,"description":"Lean entity UUID whose accounts to list."}},"required":["entity_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/get_balance":{"post":{"operationId":"lean_get_balance","summary":"Get Account Balance","description":"Retrieve the current balance for a specific bank account belonging to a Lean entity. Use list_accounts first to obtain the account_id.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"entity_id":{"type":"string","minLength":1,"description":"Lean entity UUID."},"account_id":{"type":"string","minLength":1,"description":"Lean account UUID."}},"required":["entity_id","account_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/list_transactions":{"post":{"operationId":"lean_list_transactions","summary":"List Transactions","description":"Retrieve bank transactions for a specific account belonging to a Lean entity. Filter by start_date and end_date (YYYY-MM-DD). Returns signed amounts: negative values are debits.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"entity_id":{"type":"string","minLength":1,"description":"Lean entity UUID."},"account_id":{"type":"string","minLength":1,"description":"Lean account UUID."},"start_date":{"type":"string","description":"Inclusive start date, YYYY-MM-DD. Defaults to 90 days ago."},"end_date":{"type":"string","description":"Inclusive end date, YYYY-MM-DD. Defaults to today."}},"required":["entity_id","account_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/create_payment_intent":{"post":{"operationId":"lean_create_payment_intent","summary":"Create Payment Intent","description":"Initiate a bank-to-bank (PayBy) payment for a Lean customer. Creates a payment intent that the customer authorises via the Lean Connect SDK. The intent transitions from PENDING → ACCEPTED or REJECTED once the customer acts. Idempotency: Lean deduplicates on customer_id + amount + currency within a short window.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"customer_id":{"type":"string","minLength":1,"description":"Lean customer UUID of the payer (entity who linked their bank)."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Payment amount. Must be a positive number."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code, e.g. \"SAR\" for Saudi Riyal."},"description":{"type":"string","maxLength":140,"description":"Reference text sent to the bank (max 140 chars). Defaults to the intent UUID if omitted."},"payment_destination_id":{"type":"string","description":"Lean payment destination UUID for settlement. If omitted, uses the default app destination."},"purpose_code":{"type":"string","enum":["FIS","TCS","MWP","OAT","IFS","RNT","LNC","PIN","GDS"],"description":"Payment purpose code required for KSA SAMA compliance. E.g. \"GDS\" for goods."}},"required":["customer_id","amount","currency"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/lean/get_payment_intent":{"post":{"operationId":"lean_get_payment_intent","summary":"Get Payment Intent","description":"Retrieve the current status of a Lean payment intent. Poll this after create_payment_intent to check if the customer has authorised, rejected, or if the payment is still pending. Expected statuses: PENDING, ACCEPTED, REJECTED, FAILED.","tags":["lean"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payment_intent_id":{"type":"string","minLength":1,"description":"Lean payment intent UUID (from create_payment_intent)."}},"required":["payment_intent_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mada/create_payment":{"post":{"operationId":"mada_create_payment","summary":"Create Payment","description":"Create a Mada Pay payment request. Returns a QR code and/or payment URL for the customer to complete the payment via their Mada debit card. Idempotent on order_id — resending the same order_id returns the existing payment instead of creating a duplicate.","tags":["mada"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0,"description":"Payment amount in SAR (halala-precise, e.g. 100.50 for SAR 100.50)"},"currency":{"type":"string","enum":["SAR"],"default":"SAR","description":"Currency code. Mada Pay only accepts SAR."},"order_id":{"type":"string","minLength":1,"description":"Your merchant order / reference id. Used for idempotency — resending the same order_id returns the existing payment."},"description":{"type":"string","description":"Short payment description shown to the buyer, e.g. 'Order #1234'"},"customer_name":{"type":"string","description":"Customer name for the payment receipt"},"customer_phone":{"type":"string","description":"Customer phone in E.164 format with +966 prefix, e.g. +966512345678"},"expiry_minutes":{"type":"integer","exclusiveMinimum":0,"maximum":1440,"default":30,"description":"How long the payment QR/link is valid, in minutes (max 1440 / 24 h)"},"callback_url":{"type":"string","format":"uri","description":"URL Mada Pay will POST a payment notification to when the status changes"}},"required":["amount","order_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mada/get_payment":{"post":{"operationId":"mada_get_payment","summary":"Get Payment","description":"Retrieve the current status and details of a Mada Pay payment by its payment_id. Use to poll for completion after creating a payment.","tags":["mada"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payment_id":{"type":"string","minLength":1,"description":"Mada Pay payment id (UUID)"}},"required":["payment_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mada/refund_payment":{"post":{"operationId":"mada_refund_payment","summary":"Refund Payment","description":"Initiate a full or partial refund for a paid Mada transaction. Idempotent on refund_reference — resending the same reference returns the existing refund.","tags":["mada"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payment_id":{"type":"string","minLength":1,"description":"Mada Pay payment id to refund (must be in paid status)"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to refund in SAR. Must be ≤ the original payment amount."},"reason":{"type":"string","description":"Optional free-text refund reason for audit log"},"refund_reference":{"type":"string","minLength":1,"description":"Your merchant refund reference id. Used for idempotency."}},"required":["payment_id","amount","refund_reference"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/mada/list_transactions":{"post":{"operationId":"mada_list_transactions","summary":"List Transactions","description":"List Mada Pay transactions for the merchant account. Filter by status or date range. Useful for reconciliation and settlement reporting.","tags":["mada"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","description":"Filter by status: pending, paid, expired, refunded, failed"},"date_from":{"type":"string","description":"ISO date lower bound (YYYY-MM-DD)"},"date_to":{"type":"string","description":"ISO date upper bound (YYYY-MM-DD)"},"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number"},"page_size":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":20,"description":"Results per page, max 100"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/toyou/create_shipment":{"post":{"operationId":"toyou_create_shipment","summary":"Create Shipment","description":"Create an on-demand courier/errand delivery order via the ToYou platform (Saudi Arabia). Specify pickup and dropoff coordinates (lat/lng preferred for KSA), contact names and E.164 phone numbers, and optional package details. Returns a shipment ID and initial status. Use track_shipment to poll status or get_delivery_quote to estimate cost before creating.","tags":["toyou"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"merchantReference":{"type":"string","minLength":1,"maxLength":64,"description":"Unique merchant-side reference for this shipment. Used as the idempotency key. Must be unique per shipment attempt (e.g. order-id + attempt counter)."},"pickup":{"type":"object","properties":{"latitude":{"type":"number","description":"WGS84 latitude. Preferred over street address for KSA routing."},"longitude":{"type":"number","description":"WGS84 longitude. Preferred over street address for KSA routing."},"address":{"type":"string","description":"Human-readable street address, Arabic or English. Useful fallback alongside coordinates."},"contactName":{"type":"string","description":"Name of the pickup contact. Required."},"contactPhone":{"type":"string","pattern":"^\\+966\\d{9}$","description":"KSA phone number in E.164 format (+966XXXXXXXXX). Required."}},"required":["latitude","longitude","contactName","contactPhone"],"additionalProperties":false,"description":"Pickup location and contact details."},"dropoff":{"type":"object","properties":{"latitude":{"$ref":"#/properties/pickup/properties/latitude"},"longitude":{"$ref":"#/properties/pickup/properties/longitude"},"address":{"$ref":"#/properties/pickup/properties/address"},"contactName":{"type":"string","description":"Name of the recipient. Required."},"contactPhone":{"type":"string","pattern":"^\\+966\\d{9}$","description":"KSA phone number in E.164 format (+966XXXXXXXXX). Required."}},"required":["latitude","longitude","contactName","contactPhone"],"additionalProperties":false,"description":"Dropoff/delivery destination and recipient details."},"packageDescription":{"type":"string","maxLength":255,"description":"Human-readable description of the package or errand item. e.g. 'Office documents', 'Grocery bag'."},"packageWeightKg":{"type":"number","exclusiveMinimum":0,"description":"Package weight in kilograms. Used for pricing. Omit for errand/document deliveries."},"cashOnDelivery":{"type":"number","minimum":0,"description":"Cash-on-delivery amount in SAR. Omit or set 0 if not applicable."},"notes":{"type":"string","maxLength":500,"description":"Special instructions for the courier, e.g. 'Ring the bell twice'."}},"required":["merchantReference","pickup","dropoff"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/toyou/track_shipment":{"post":{"operationId":"toyou_track_shipment","summary":"Track Shipment","description":"Retrieve the current status and real-time courier location of a ToYou shipment by its shipment ID. Use this to poll after create_shipment or to verify a status reported by a webhook. Status values (modelled): pending, accepted, courier_assigned, en_route_pickup, picked_up, en_route_delivery, delivered, failed, cancelled.","tags":["toyou"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"shipmentId":{"type":"string","minLength":1,"description":"ToYou shipment ID returned by create_shipment."}},"required":["shipmentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/toyou/get_delivery_quote":{"post":{"operationId":"toyou_get_delivery_quote","summary":"Get Delivery Quote","description":"Estimate the cost and expected delivery time for a ToYou shipment before creating it. Provide pickup and dropoff coordinates (lat/lng) and optional package weight. Returns the quoted price in SAR and estimated pickup/delivery time windows. Call this before create_shipment to show pricing to the end user.","tags":["toyou"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"pickup":{"type":"object","properties":{"latitude":{"type":"number","description":"Pickup latitude (WGS84)."},"longitude":{"type":"number","description":"Pickup longitude (WGS84)."}},"required":["latitude","longitude"],"additionalProperties":false,"description":"Pickup coordinates."},"dropoff":{"type":"object","properties":{"latitude":{"type":"number","description":"Dropoff latitude (WGS84)."},"longitude":{"type":"number","description":"Dropoff longitude (WGS84)."}},"required":["latitude","longitude"],"additionalProperties":false,"description":"Dropoff coordinates."},"packageWeightKg":{"type":"number","exclusiveMinimum":0,"description":"Package weight in kilograms. Optional; affects pricing."}},"required":["pickup","dropoff"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/toyou/cancel_shipment":{"post":{"operationId":"toyou_cancel_shipment","summary":"Cancel Shipment","description":"Cancel a ToYou shipment that is still in a cancellable state (pending or accepted). Shipments that have already been picked up by a courier cannot be cancelled. Provide an optional cancellation reason for your records.","tags":["toyou"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"shipmentId":{"type":"string","minLength":1,"description":"ToYou shipment ID to cancel. Must be in a cancellable state (pending, accepted)."},"reason":{"type":"string","maxLength":255,"description":"Human-readable cancellation reason. Recommended for merchant record-keeping."}},"required":["shipmentId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tap/create_charge":{"post":{"operationId":"tap_create_charge","summary":"Create Charge","description":"Create a Tap charge and get a hosted payment page URL (payment_url) to send the customer to. amount is in the currency's MAJOR unit (e.g. 25.00 for 25 SAR), NOT cents. Use source_id 'src_all' (default) to show every enabled method (cards, KNET, mada, Apple Pay, ...) or 'src_card' for card-only. The returned status starts as INITIATED; the charge only becomes CAPTURED after the customer pays — poll get_charge or rely on your post_url webhook for the final result.","tags":["tap"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0,"description":"Charge amount in the currency's MAJOR unit (e.g. 10.500 for 10.5 KWD, 25.00 for 25 SAR). NOT cents/minor units."},"currency":{"type":"string","enum":["KWD","SAR","AED","BHD","QAR","OMR","EGP","USD","EUR","GBP"],"description":"ISO currency code. Must be enabled on your Tap account for the destination market (KWD, SAR, AED, BHD, QAR, OMR, EGP, ...)."},"customer":{"type":"object","properties":{"id":{"type":"string","description":"Existing Tap customer id (cus_...). When set, Tap reuses the stored customer and the name/email/phone below are ignored."},"first_name":{"type":"string","description":"Customer first name"},"last_name":{"type":"string","description":"Customer last name"},"email":{"type":"string","format":"email","description":"Customer email address"},"phone_country_code":{"type":"string","description":"Phone country code WITHOUT '+', e.g. '965' for Kuwait, '966' for KSA"},"phone_number":{"type":"string","description":"Local phone number without the country code, e.g. '51234567'"}},"additionalProperties":false,"description":"Customer to bill. Provide either an existing id, or name + email/phone."},"source_id":{"type":"string","default":"src_all","description":"Payment source. Use 'src_all' (default) to show every enabled method on Tap's hosted page; 'src_card' for card-only; or a method-specific id like 'src_kw.knet'."},"redirect_url":{"type":"string","format":"uri","description":"URL Tap redirects the customer back to after they finish (or abandon) the hosted payment page. Required."},"post_url":{"type":"string","format":"uri","description":"Server-to-server webhook URL Tap POSTs the final charge result to. Recommended for reliable status (don't trust the redirect alone)."},"description":{"type":"string","description":"Statement / receipt description shown to the buyer, e.g. 'Order #1234'"},"reference_order":{"type":"string","description":"Your order reference, echoed back on the charge for reconciliation (reference.order)"},"reference_transaction":{"type":"string","description":"Your transaction reference, echoed back on the charge (reference.transaction)"},"threeDSecure":{"type":"boolean","default":true,"description":"Whether to enforce 3-D Secure. Default true; only disable if your account is explicitly approved for non-3DS."},"save_card":{"type":"boolean","default":false,"description":"Tokenize the card against the customer for future charges. Requires a real (non-src_all) card flow."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Free-form key/value pairs stored on the charge (string values only)."}},"required":["amount","currency","customer","redirect_url"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tap/get_charge":{"post":{"operationId":"tap_get_charge","summary":"Get Charge","description":"Retrieve the current status and details of a Tap charge by its id (chg_...). Use this to confirm payment after redirecting the customer: a successful payment shows status CAPTURED, while INITIATED/ABANDONED means the customer has not completed it. Prefer this over trusting the redirect query string.","tags":["tap"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"charge_id":{"type":"string","minLength":1,"description":"Tap charge id to retrieve (chg_...)"}},"required":["charge_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tap/create_refund":{"post":{"operationId":"tap_create_refund","summary":"Create Refund","description":"Refund a captured Tap charge, fully or partially. amount is in the currency's MAJOR unit (e.g. 10.00 for 10 SAR) and must not exceed the charge's remaining refundable balance; currency must match the original charge. The charge must be in CAPTURED status. This moves settled funds and cannot be undone.","tags":["tap"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"charge_id":{"type":"string","minLength":1,"description":"Tap charge id to refund (chg_...). The charge must be in CAPTURED status."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to refund in the currency major unit. Must be <= the charge's remaining refundable amount."},"currency":{"type":"string","enum":["KWD","SAR","AED","BHD","QAR","OMR","EGP","USD","EUR","GBP"],"description":"Currency of the refund. Must match the original charge currency."},"reason":{"type":"string","enum":["requested_by_customer","duplicate","fraudulent","other"],"default":"requested_by_customer","description":"Refund reason for Tap's records. One of: requested_by_customer, duplicate, fraudulent, other."},"reference_merchant":{"type":"string","description":"Your merchant refund reference, echoed back on the refund (reference.merchant)."},"post_url":{"type":"string","format":"uri","description":"Webhook URL Tap POSTs the refund result to."}},"required":["charge_id","amount","currency"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tap/list_charges":{"post":{"operationId":"tap_list_charges","summary":"List Charges","description":"List charges on the Tap account, most recent first. Filter by status (e.g. CAPTURED) and by a creation date window using UNIX epoch MILLISECONDS (date_from / date_to). Returns up to `limit` charges (default 25, max 100). Useful for reconciliation and settlement reporting.","tags":["tap"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"status":{"type":"string","enum":["INITIATED","IN_PROGRESS","ABANDONED","CANCELLED","FAILED","DECLINED","RESTRICTED","CAPTURED","VOID","TIMEDOUT","UNKNOWN"],"description":"Filter to a single charge status, e.g. CAPTURED. Omit to return all statuses."},"date_from":{"type":"integer","description":"Lower bound on charge creation, UNIX epoch in MILLISECONDS (Tap's period.date.from)."},"date_to":{"type":"integer","description":"Upper bound on charge creation, UNIX epoch in MILLISECONDS (Tap's period.date.to)."},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100,"default":25,"description":"Max charges to return (most recent first), 1-100. Default 25."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/tap/create_customer":{"post":{"operationId":"tap_create_customer","summary":"Create Customer","description":"Create a reusable Tap customer and get back its id (cus_...). Pass that id as customer.id in create_charge to skip re-entering buyer details and to charge saved cards on repeat purchases. first_name is required; email and/or phone are recommended. Returns is_test=true when created with a sandbox key.","tags":["tap"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"description":"Customer first name (required)"},"middle_name":{"type":"string","description":"Customer middle name"},"last_name":{"type":"string","description":"Customer last name"},"email":{"type":"string","format":"email","description":"Customer email address"},"phone_country_code":{"type":"string","description":"Phone country code WITHOUT '+', e.g. '965'. Required if phone_number is set."},"phone_number":{"type":"string","description":"Local phone number without the country code, e.g. '51234567'."},"description":{"type":"string","description":"Free-text note stored on the customer"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Free-form key/value pairs stored on the customer (string values only)."}},"required":["first_name"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/moyasar/create_payment":{"post":{"operationId":"moyasar_create_payment","summary":"Create Payment","description":"Charge a card, saved token, or wallet through Moyasar (KSA). amount is in the SMALLEST currency unit (halalas): 100 = SAR 1.00. A creditcard/token source needs callback_url because the buyer is redirected through 3-D Secure and the payment returns status 'initiated' with a source.transaction_url they must open. Set manual: true to AUTHORIZE only (status 'authorized'), then call capture_payment later. Note: raw card data (source.type creditcard) puts you in server-side PCI scope; prefer token or wallet sources where possible.","tags":["moyasar"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"description":"Amount in the SMALLEST currency unit (halalas): 100 = SAR 1.00, 1000 = KWD 1.000"},"currency":{"type":"string","enum":["SAR","USD","EUR","GBP","KWD","AED","BHD","QAR","OMR","EGP","JOD"],"default":"SAR","description":"ISO-4217 currency code. Defaults to SAR."},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"creditcard"},"name":{"type":"string","minLength":1,"description":"Cardholder name, two or more words"},"number":{"type":"string","minLength":12,"description":"Card number, 12-19 digits, no spaces"},"month":{"type":"string","minLength":1,"maxLength":2,"description":"Expiry month, 1-12 (string, e.g. '08')"},"year":{"type":"string","minLength":2,"description":"Expiry year, 2 or 4 digits, e.g. '27'"},"cvc":{"type":"string","minLength":3,"maxLength":4,"description":"Card security code, 3-4 digits"}},"required":["type","name","number","month","year","cvc"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"token"},"token":{"type":"string","minLength":1,"description":"Previously saved card token from Moyasar"}},"required":["type","token"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"stcpay"},"mobile":{"type":"string","minLength":1,"description":"STC Pay Saudi mobile number, e.g. 0512345678"}},"required":["type","mobile"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"applepay"},"token":{"type":"string","minLength":1,"description":"Apple Pay encrypted payment token"}},"required":["type","token"],"additionalProperties":false}],"description":"Payment method. Use creditcard for raw card data (server-side PCI scope), token for a saved card, stcpay or applepay for wallets."},"description":{"type":"string","description":"Free-text shown on the dashboard and receipt"},"callback_url":{"type":"string","format":"uri","description":"Required for creditcard/token: where Moyasar redirects the buyer after 3-D Secure"},"manual":{"type":"boolean","default":false,"description":"Set true to AUTHORIZE only (no charge). The payment lands in 'authorized' status; call capture_payment to take the money, within ~7 days, else it auto-voids."},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Up to 8 string key/value pairs echoed back on the payment"}},"required":["amount","source"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/moyasar/get_payment":{"post":{"operationId":"moyasar_get_payment","summary":"Get Payment","description":"Fetch the current state of one Moyasar payment by its id. Use this to poll after create_payment until status leaves 'initiated' (the buyer finished 3-D Secure) and reaches 'paid', 'authorized', or 'failed'. Amounts are in the smallest currency unit.","tags":["moyasar"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payment_id":{"type":"string","minLength":1,"description":"Moyasar payment id (UUID)"}},"required":["payment_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/moyasar/list_payments":{"post":{"operationId":"moyasar_list_payments","summary":"List Payments","description":"List Moyasar payments newest-first, one page at a time (default page 1). Filter by status (initiated, paid, authorized, captured, refunded, voided, failed, verified) and by a created date range. Use the returned total_pages / next_page to walk the full history for reconciliation. Amounts are in the smallest currency unit.","tags":["moyasar"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0,"default":1,"description":"1-based page number; results are reverse-chronological"},"status":{"type":"string","enum":["initiated","paid","authorized","captured","refunded","voided","failed","verified"],"description":"Filter by payment status"},"id":{"type":"string","description":"Exact payment id to look for"},"created_gt":{"type":"string","description":"Only payments created on/after this ISO date (created[gt])"},"created_lt":{"type":"string","description":"Only payments created on/before this ISO date (created[lt])"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/moyasar/refund_payment":{"post":{"operationId":"moyasar_refund_payment","summary":"Refund Payment","description":"Refund a paid or captured Moyasar payment back to the buyer's card. Pass amount (in the smallest currency unit) for a partial refund; omit it to refund the full captured amount. Returns the payment with status 'refunded' and the refunded total. Gotcha: to reverse a charge within ~2 hours of the original transaction use void (Moyasar voids same-day; older charges must be refunded).","tags":["moyasar"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payment_id":{"type":"string","minLength":1,"description":"Moyasar payment id to refund (must be paid or captured)"},"amount":{"type":"integer","exclusiveMinimum":0,"description":"Optional partial-refund amount in smallest unit. Omit to refund the full captured amount."}},"required":["payment_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/moyasar/capture_payment":{"post":{"operationId":"moyasar_capture_payment","summary":"Capture Payment","description":"Capture (settle) a payment that was created with manual: true and is currently in 'authorized' status. Pass amount (smallest currency unit) to capture part of the hold and release the rest back to the card; omit it to capture the full authorized amount. Returns the payment with status 'captured'. Authorizations expire (~7 days) and auto-void if never captured.","tags":["moyasar"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"payment_id":{"type":"string","minLength":1,"description":"Moyasar payment id to capture (must be in 'authorized' status)"},"amount":{"type":"integer","exclusiveMinimum":0,"description":"Optional partial-capture amount in smallest unit; the uncaptured remainder is released back to the card. Omit to capture the full authorized amount."}},"required":["payment_id"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telr/create_order":{"post":{"operationId":"telr_create_order","summary":"Create Order (Hosted Payment Page)","description":"Open a Telr Hosted Payment Page order and get back a payment URL to redirect or open for the buyer. Amount is in MAJOR currency units (e.g. 10.50 = AED 10.50), defaults to AED. cartId must be unique per attempt — Telr rejects a reused cartId with error E56. Returns orderRef (poll it with check_status) and paymentUrl. Set test=true to route through Telr test mode with no real charge.","tags":["telr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"cartId":{"type":"string","minLength":1,"maxLength":63,"description":"Your unique order/cart id (max 63 chars). Telr rejects a duplicate cart id with E56, so generate a fresh one per attempt."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount in MAJOR units of the currency (e.g. 10.50 = AED 10.50), not fils. Sent with 2 decimals."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","default":"AED","description":"3-letter ISO currency code. Defaults to AED (Telr's home currency)."},"description":{"type":"string","minLength":1,"maxLength":63,"description":"Short purchase description shown on the payment page (max 63 chars)."},"returnAuthorised":{"type":"string","format":"uri","description":"URL the buyer is redirected to after an approved payment."},"returnDeclined":{"type":"string","format":"uri","description":"URL the buyer is redirected to after a declined payment."},"returnCancelled":{"type":"string","format":"uri","description":"URL the buyer is redirected to if they cancel the payment."},"test":{"type":"boolean","default":false,"description":"true routes through Telr test mode (no real charge). Telr has no separate sandbox host; test vs live is per-order."},"framed":{"type":"number","enum":[0,1,2],"default":0,"description":"Display mode: 0 = standalone redirect page, 1 = iframe (no full page), 2 = iframe with full-page fallback."},"customerEmail":{"type":"string","format":"email","description":"Optional buyer email, prefilled on the payment page."},"customerName":{"type":"string","description":"Optional buyer full name, prefilled on the payment page."}},"required":["cartId","amount","description","returnAuthorised","returnDeclined","returnCancelled"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telr/check_status":{"post":{"operationId":"telr_check_status","summary":"Check Order Status","description":"Look up the current status of a Telr order by its orderRef (from create_order). Use this to confirm payment after the buyer returns. statusCode: 1=pending, 2=authorised, 3=paid/captured, -1=expired, -2=cancelled, -3=declined. Once paid it returns transactionRef — the value you pass to refund.","tags":["telr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"orderRef":{"type":"string","minLength":1,"description":"Telr order reference returned by create_order."}},"required":["orderRef"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telr/refund":{"post":{"operationId":"telr_refund","summary":"Refund Transaction","description":"Refund a captured Telr transaction via the Remote API. Pass the original transactionRef (from check_status) and the amount in MAJOR units (e.g. 10.50). Amount must not exceed the original captured total; multiple partial refunds are allowed up to that total. No card details are required. The refund is accepted when the returned status is 'A' (approved); inspect approved/message otherwise.","tags":["telr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"transactionRef":{"type":"string","minLength":1,"description":"Gateway transaction reference of the original sale to refund (from check_status.transactionRef). Card details are NOT needed for a refund."},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount to refund in MAJOR units (e.g. 10.50). Must not exceed the original captured amount. Multiple partial refunds are allowed up to the original total."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","default":"AED","description":"3-letter ISO currency of the original transaction. Defaults to AED."},"cartId":{"type":"string","maxLength":63,"description":"Optional your-side reference for the refund (max 63 chars)."},"description":{"type":"string","maxLength":63,"description":"Optional refund description for your records (max 63 chars)."}},"required":["transactionRef","amount"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telr/list_transactions":{"post":{"operationId":"telr_list_transactions","summary":"List Transactions","description":"List recent Telr transactions for the store, optionally filtered by date range or status, for reconciliation and settlement reporting. Paginated with start (offset) and count (page size, max 200). MODELLED endpoint: Telr does not publicly document a body-credential list method on the gateway, so the field mapping is tolerant — confirm against your account before relying on it (see README).","tags":["telr"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"dateFrom":{"type":"string","description":"Optional ISO date lower bound (YYYY-MM-DD)."},"dateTo":{"type":"string","description":"Optional ISO date upper bound (YYYY-MM-DD)."},"status":{"type":"string","description":"Optional status filter, e.g. 'paid' or 'declined'."},"start":{"type":"integer","minimum":0,"default":0,"description":"Zero-based offset for pagination."},"count":{"type":"integer","exclusiveMinimum":0,"maximum":200,"default":50,"description":"Page size, max 200."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telegram/send_message":{"post":{"operationId":"telegram_send_message","summary":"Send Message","description":"Send a text message to a Telegram chat or channel. This is the primary tool for operator alerts. chatId is a numeric chat id (negative for groups/channels) or a public @channelusername. Text is 1-4096 characters. Set parseMode to 'HTML' or 'MarkdownV2' for formatting, or omit for plain text (safest, no escaping). Set disableNotification to deliver silently. The bot must already be a member of the target group/channel, otherwise Telegram returns 403.","tags":["telegram"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"chatId":{"anyOf":[{"type":"integer"},{"type":"string","minLength":1}],"description":"Target chat: numeric chat id (negative for groups/channels) or a public @channelusername string"},"text":{"type":"string","minLength":1,"maxLength":4096,"description":"Message text, 1-4096 characters after entity parsing"},"parseMode":{"type":"string","enum":["MarkdownV2","HTML","Markdown"],"description":"Formatting of text/caption. HTML is the most forgiving; MarkdownV2 requires escaping many chars. Omit for plain text."},"disableNotification":{"type":"boolean","default":false,"description":"Send silently: the user gets a notification with no sound"},"disableWebPagePreview":{"type":"boolean","default":false,"description":"Disable link previews for URLs in this message"},"replyToMessageId":{"type":"integer","exclusiveMinimum":0,"description":"If set, send this message as a reply to that message id"}},"required":["chatId","text"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telegram/send_photo":{"post":{"operationId":"telegram_send_photo","summary":"Send Photo","description":"Send a photo to a Telegram chat or channel. The photo must be a public HTTPS URL or a previously uploaded Telegram file_id — raw file uploads are not supported here, so host the image first (e.g. a chart or dashboard screenshot). Add an optional caption (0-1024 chars), with parseMode 'HTML'/'MarkdownV2' for formatting. Telegram fetches URL images itself; they must be under 5 MB and JPEG/PNG/etc.","tags":["telegram"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"chatId":{"anyOf":[{"type":"integer"},{"type":"string","minLength":1}],"description":"Target chat: numeric chat id (negative for groups/channels) or a public @channelusername string"},"photo":{"type":"string","minLength":1,"description":"Photo as a public HTTPS URL or a previously uploaded Telegram file_id (no raw uploads)"},"caption":{"type":"string","maxLength":1024,"description":"Optional caption under the photo, 0-1024 characters"},"parseMode":{"type":"string","enum":["MarkdownV2","HTML","Markdown"],"description":"Formatting of text/caption. HTML is the most forgiving; MarkdownV2 requires escaping many chars. Omit for plain text."},"disableNotification":{"type":"boolean","default":false,"description":"Send silently with no notification sound"}},"required":["chatId","photo"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telegram/send_document":{"post":{"operationId":"telegram_send_document","summary":"Send Document","description":"Send a file (PDF, Excel, CSV, etc.) to a Telegram chat or channel. The document must be a public HTTPS URL or a previously uploaded Telegram file_id — raw uploads are not supported here, so host the file first (e.g. an invoice PDF or export). Add an optional caption (0-1024 chars). URL-fetched files must be under 20 MB.","tags":["telegram"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"chatId":{"anyOf":[{"type":"integer"},{"type":"string","minLength":1}],"description":"Target chat: numeric chat id (negative for groups/channels) or a public @channelusername string"},"document":{"type":"string","minLength":1,"description":"File as a public HTTPS URL or a previously uploaded Telegram file_id (no raw uploads)"},"caption":{"type":"string","maxLength":1024,"description":"Optional caption under the file, 0-1024 characters"},"parseMode":{"type":"string","enum":["MarkdownV2","HTML","Markdown"],"description":"Formatting of text/caption. HTML is the most forgiving; MarkdownV2 requires escaping many chars. Omit for plain text."},"disableNotification":{"type":"boolean","default":false,"description":"Send silently with no notification sound"}},"required":["chatId","document"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telegram/get_updates":{"post":{"operationId":"telegram_get_updates","summary":"Get Updates","description":"Poll inbound updates (messages, replies, callback queries) the bot has received. Returns updates oldest-first with their update_id. To acknowledge and avoid re-reading, call again with offset = lastUpdateId + 1. timeout enables long polling (0-50s; 0 returns immediately). GOTCHA: getUpdates cannot be used while a webhook is set — delete the webhook first, or these calls return a 409 conflict.","tags":["telegram"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"offset":{"type":"integer","description":"Return updates with update_id >= offset. Pass last update_id + 1 to ack and skip processed updates."},"limit":{"type":"integer","minimum":1,"maximum":100,"default":100,"description":"Max updates to return, 1-100, default 100"},"timeout":{"type":"integer","minimum":0,"maximum":50,"default":0,"description":"Long-poll timeout in seconds, 0-50. 0 = short poll (returns immediately)."},"allowedUpdates":{"type":"array","items":{"type":"string","minLength":1},"description":"Update types to receive, e.g. ['message','callback_query']. Omit for all except chat_member."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telegram/get_chat":{"post":{"operationId":"telegram_get_chat","summary":"Get Chat","description":"Look up current info about a chat by numeric chat id or public @username. Returns the chat type ('private' | 'group' | 'supergroup' | 'channel'), title, username, first name, and description. Useful to confirm the bot is targeting the right channel before sending, or to resolve a @username to a numeric id. The bot must be a member of the chat (or it must be public) for this to succeed.","tags":["telegram"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"chatId":{"anyOf":[{"type":"integer"},{"type":"string","minLength":1}],"description":"Target chat: numeric chat id (negative for groups/channels) or a public @channelusername string"}},"required":["chatId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/telegram/get_me":{"post":{"operationId":"telegram_get_me","summary":"Get Bot Info","description":"Return the authenticated bot's own profile: its user id, display name, @username, and whether it can join groups / supports inline queries. Takes no input. Use it as a health check that the bot token is valid before sending, or to discover the bot's @username for share links.","tags":["telegram"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cequens/send_sms":{"post":{"operationId":"cequens_send_sms","summary":"Send SMS","description":"Send one transactional or marketing SMS to one or more recipients through CEQUENS. senderName must be an approved Sender ID for the destination country, and recipients are E.164 numbers (e.g. 201234567890). Set messageType to 'unicode' for Arabic or emoji (70 chars/part) instead of 'text' (160 chars/part). Each recipient is billed separately.","tags":["cequens"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"senderName":{"type":"string","minLength":1,"description":"Approved CEQUENS Sender ID (alphanumeric or short code). Must be pre-approved for the destination country or the message is rejected."},"messageText":{"type":"string","minLength":1,"description":"Message body. Plain GSM-7 text counts 160 chars/part; any non-GSM character switches the whole message to Unicode at 70 chars/part."},"recipients":{"type":"array","items":{"type":"string","pattern":"^\\+?[1-9]\\d{6,14}$"},"minItems":1,"maxItems":100,"description":"One or more recipient numbers in E.164 format (e.g. 201234567890). Sent in a single submission; each number is billed separately."},"messageType":{"type":"string","enum":["text","unicode"],"default":"text","description":"text for GSM-7 Latin, unicode for Arabic/emoji. Defaults to text."},"clientMessageId":{"type":"string","description":"Your own correlation id, echoed back for reconciliation."}},"required":["senderName","messageText","recipients"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cequens/send_otp":{"post":{"operationId":"cequens_send_otp","summary":"Send OTP","description":"Start an OTP verification via the CEQUENS Verification Hub: CEQUENS generates and delivers a one-time code to the recipient over SMS (default) or WhatsApp. Returns a verificationId you must pass to verify_otp to validate the code the user enters. codeLength defaults to 6 digits and the code expires after expirySeconds (default 300s / 5 min). Do not generate the code yourself — CEQUENS owns it.","tags":["cequens"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"recipient":{"type":"string","pattern":"^\\+?[1-9]\\d{6,14}$","description":"Destination number in E.164 format the OTP is sent to."},"channel":{"type":"string","enum":["sms","whatsapp"],"default":"sms","description":"Delivery channel. sms is the default; whatsapp uses the Verification Hub WhatsApp fallback."},"senderName":{"type":"string","description":"Sender ID to deliver the SMS OTP from. Required for sms unless a default is configured on the account."},"template":{"type":"string","description":"Verification template name to render the code in. Uses the account default template when omitted."},"codeLength":{"type":"integer","minimum":4,"maximum":8,"default":6,"description":"Number of digits in the generated OTP. Defaults to 6."},"expirySeconds":{"type":"integer","exclusiveMinimum":0,"maximum":3600,"default":300,"description":"How long the code stays valid, in seconds. Defaults to 300 (5 minutes)."},"lang":{"type":"string","enum":["en","ar"],"default":"en","description":"Template language for the OTP message: en or ar."}},"required":["recipient"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cequens/verify_otp":{"post":{"operationId":"cequens_verify_otp","summary":"Verify OTP","description":"Validate the OTP code a user entered against a verification started by send_otp. Pass the verificationId from send_otp and the digits the user typed. Returns verified=true only when the code matches and is still within its expiry window; an expired or wrong code returns verified=false with a status of expired or failed. Verification is single-use.","tags":["cequens"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"verificationId":{"type":"string","minLength":1,"description":"The verificationId returned by send_otp."},"code":{"type":"string","minLength":4,"maxLength":8,"description":"The OTP digits the user entered."}},"required":["verificationId","code"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cequens/get_balance":{"post":{"operationId":"cequens_get_balance","summary":"Get Balance","description":"Read the remaining CEQUENS account balance/credit so an agent can decide whether to keep sending before a top-up is needed. Returns the balance in the account currency plus the credit limit for postpaid accounts. Takes no input.","tags":["cequens"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/cequens/send_whatsapp":{"post":{"operationId":"cequens_send_whatsapp","summary":"Send WhatsApp Message","description":"Send a free-text WhatsApp Business message (max 4096 chars) to a customer through CEQUENS. IMPORTANT: free-text only delivers inside the 24-hour customer service window (the 24h after the customer last messaged you); to reach a customer outside that window you must use a pre-approved template, which this tool does not send. Set previewUrl=true to render a link preview.","tags":["cequens"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"to":{"type":"string","pattern":"^\\+?[1-9]\\d{6,14}$","description":"Recipient WhatsApp number in E.164 format (e.g. 201234567890)."},"body":{"type":"string","minLength":1,"maxLength":4096,"description":"Free-text message body, max 4096 chars. Only delivered inside the 24-hour customer service window; outside it you must use an approved template (not covered by this tool)."},"previewUrl":{"type":"boolean","default":false,"description":"Render a link preview when the body contains a URL."},"clientReferenceId":{"type":"string","description":"Your own correlation id, echoed back for reconciliation."}},"required":["to","body"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/snapchat-marketing/list_campaigns":{"post":{"operationId":"snapchat-marketing_list_campaigns","summary":"List Campaigns","description":"List every campaign in the connected Snapchat ad account, including each campaign's status (ACTIVE/PAUSED), objective, and budgets. Budgets are in micro-currency (1 currency unit = 1,000,000 micro). Page size is 50-1000 (default 50); use the returned nextLink cursor to page further.","tags":["snapchat-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"limit":{"type":"integer","minimum":50,"maximum":1000,"default":50,"description":"Page size, Snap allows 50-1000 (default 50)"},"sort":{"type":"string","enum":["updated_at-desc","created_at-desc"],"description":"Sort order; omit for Snap's default (created_at)"},"includeDeleted":{"type":"boolean","default":false,"description":"Include deleted campaigns (read_deleted_entities=true)"}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/snapchat-marketing/pause_campaign":{"post":{"operationId":"snapchat-marketing_pause_campaign","summary":"Pause Campaign","description":"Pause a Snapchat campaign by setting its status to PAUSED. This immediately stops all delivery and spend for the campaign and its ad squads. Reversible with resume_campaign. Uses a read-modify-write so other campaign fields (name, budget, schedule) are preserved.","tags":["snapchat-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Id of the campaign to pause (stops all delivery and spend)"}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/snapchat-marketing/resume_campaign":{"post":{"operationId":"snapchat-marketing_resume_campaign","summary":"Resume Campaign","description":"Resume a paused Snapchat campaign by setting its status to ACTIVE. Note that actual delivery still depends on the campaign schedule (start/end time), remaining budget, and the status of its ad squads and ads. Uses a read-modify-write so other campaign fields are preserved.","tags":["snapchat-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Id of the campaign to resume (sets status ACTIVE; delivery still depends on schedule and budget)"}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/snapchat-marketing/get_campaign_stats":{"post":{"operationId":"snapchat-marketing_get_campaign_stats","summary":"Get Campaign Stats","description":"Fetch delivery stats for one Snapchat campaign. granularity TOTAL or LIFETIME returns a single summed row (totalStats); DAY or HOUR returns a timeseries and REQUIRES startTime and endTime aligned to an hour boundary. Default metrics are impressions and spend; pass fields like ['impressions','spend','swipes','video_views']. spend is in micro-currency. Data updates every ~15 min and finalizes ~48h after the ad-account-timezone day ends.","tags":["snapchat-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Id of the campaign to report on"},"granularity":{"type":"string","enum":["TOTAL","DAY","HOUR","LIFETIME"],"default":"TOTAL","description":"Aggregation: TOTAL/LIFETIME return one summed row; DAY/HOUR return a timeseries and REQUIRE start_time and end_time aligned to an hour boundary"},"fields":{"type":"array","items":{"type":"string","minLength":1},"description":"Metrics to fetch, e.g. ['impressions','spend','swipes','video_views']. Defaults to impressions,spend. spend is in micro-currency."},"startTime":{"type":"string","description":"ISO 8601 start (required for DAY/HOUR, must align to an hour boundary)"},"endTime":{"type":"string","description":"ISO 8601 end (required for DAY/HOUR, must align to an hour boundary)"},"swipeUpAttributionWindow":{"type":"string","enum":["1_DAY","7_DAY","28_DAY"],"description":"Swipe-up attribution window, default 28_DAY"},"viewAttributionWindow":{"type":"string","enum":["none","1_HOUR","3_HOUR","6_HOUR","1_DAY","7_DAY","28_DAY"],"description":"View attribution window, default 1_DAY"}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/snapchat-marketing/update_budget":{"post":{"operationId":"snapchat-marketing_update_budget","summary":"Update Campaign Budget","description":"Change a Snapchat campaign's daily budget and/or lifetime spend cap. Amounts are in micro-currency: 1 currency unit = 1,000,000 micro, so a 200 SAR/day cap is 200000000. Snap's documented minimum is 20,000,000 (20 units). Provide dailyBudgetMicro and/or lifetimeSpendCapMicro. Uses a read-modify-write so name, status, and schedule are preserved. Note: many campaigns set budgets at the ad-squad level instead; this updates the campaign-level fields only.","tags":["snapchat-marketing"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"campaignId":{"type":"string","minLength":1,"description":"Id of the campaign to re-budget"},"dailyBudgetMicro":{"type":"integer","minimum":20000000,"description":"New daily budget in micro-currency (1 unit = 1,000,000 micro). Snap minimum is 20,000,000 (20 currency units)."},"lifetimeSpendCapMicro":{"type":"integer","minimum":20000000,"description":"New lifetime spend cap in micro-currency. Snap minimum is 20,000,000."}},"required":["campaignId"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/read_range":{"post":{"operationId":"google-sheets_read_range","summary":"Read Range","description":"Read a rectangular A1 range from a spreadsheet and return the rows as arrays of cell values. Use this to pull a table, a column, or a single cell (e.g. range \"Sheet1!A1:D50\"). Trailing empty cells and rows are dropped by the API, so rows can be ragged. For looking up specific rows by an id, prefer find_rows; to read several ranges at once, use batch_get.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."},"range":{"type":"string","minLength":1,"description":"A1 range, e.g. \"Sheet1!A1:D50\". Tab name is optional; quote it if it has spaces ('Sales 2026'!A:C). Whole column is A:A."}},"required":["range"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/append_row":{"post":{"operationId":"google-sheets_append_row","summary":"Append Row","description":"Append one or more rows to the end of a table WITHOUT overwriting existing data. The API locates the table at the given range and inserts new rows after the last one (valueInputOption=USER_ENTERED so formulas and dates parse as if typed in the UI; insertDataOption=INSERT_ROWS so nothing below is clobbered). Pass `values` as an array of rows, each an array of cell values. Use update_range instead when you need to overwrite a specific range rather than add to the bottom.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."},"range":{"type":"string","minLength":1,"description":"The table range to append to, e.g. \"Sheet1!A:D\" or \"Sheet1!A1\". The API finds the existing table at this range and inserts after the last row."},"values":{"type":"array","items":{"type":"array","items":{"type":["string","number","boolean"]}},"minItems":1,"description":"Rows to append, each an array of cell values. Use one inner array per row."}},"required":["range","values"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/update_range":{"post":{"operationId":"google-sheets_update_range","summary":"Update Range","description":"Overwrite a specific A1 range with new values (valueInputOption=USER_ENTERED). This replaces whatever is currently in the range — it does NOT shift or insert rows. The shape of `values` should match the target range; extra cells beyond the data are left untouched. To add rows to the bottom of a table without clobbering, use append_row; to wipe a range instead of rewriting it, use clear_range.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."},"range":{"type":"string","minLength":1,"description":"A1 range, e.g. \"Sheet1!A1:D50\". Tab name is optional; quote it if it has spaces ('Sales 2026'!A:C). Whole column is A:A."},"values":{"type":"array","items":{"type":"array","items":{"type":["string","number","boolean"]}},"minItems":1,"description":"Rows to write into the range, overwriting whatever is there. Shape should match the range."}},"required":["range","values"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/get_spreadsheet":{"post":{"operationId":"google-sheets_get_spreadsheet","summary":"Get Spreadsheet","description":"Fetch spreadsheet metadata: the file title and the list of tabs (sheets) with each tab's name, id, position, and grid dimensions (rows x columns). Call this first when you don't know the tab names — you need a tab name to build A1 ranges for read_range / update_range. This returns no cell values.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/clear_range":{"post":{"operationId":"google-sheets_clear_range","summary":"Clear Range","description":"Permanently delete the cell VALUES in an A1 range. Formatting, data validation, and the rows/columns themselves are kept — only contents are wiped. This cannot be undone via the API. Use update_range to replace values instead of clearing them.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."},"range":{"type":"string","minLength":1,"description":"A1 range to clear. Only cell values are removed; formatting and the rows themselves stay."}},"required":["range"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/batch_get":{"post":{"operationId":"google-sheets_batch_get","summary":"Batch Get","description":"Read several A1 ranges in a single API call and get one result block per range, in request order. Cheaper and faster than calling read_range repeatedly when you need data from multiple tabs or non-adjacent areas (e.g. read \"Summary!A1:B5\" and \"Orders!A1:H100\" together). Each result has its own `range` and `rows`.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."},"ranges":{"type":"array","items":{"type":"string","minLength":1,"description":"A1 range, e.g. \"Sheet1!A1:D50\". Tab name is optional; quote it if it has spaces ('Sales 2026'!A:C). Whole column is A:A."},"minItems":1,"description":"Two or more A1 ranges to read in a single API call"}},"required":["ranges"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/tools/google-sheets/find_rows":{"post":{"operationId":"google-sheets_find_rows","summary":"Find Rows","description":"Read a range and return only the rows where a given column equals a value — a lookup over the sheet (handy for finding an order, SKU, or customer by id without pulling the whole table into the conversation). `column` is the 0-based index WITHIN the range (0 = the range's first column). Matching is case-sensitive string equality (cell values are stringified first). Set hasHeader=true to skip and return the header row. This filters client-side after a read_range, so keep the range tight.","tags":["google-sheets"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"spreadsheetId":{"type":"string","minLength":1,"description":"Spreadsheet ID — the long token in the sheet URL between /d/ and /edit. Omit to use the connection's default_spreadsheet_id."},"range":{"type":"string","minLength":1,"description":"Range to scan, e.g. \"Orders!A1:H500\". Read the smallest box that covers your data."},"column":{"type":"integer","minimum":0,"description":"0-based column index within the range to match against (0 = first column of the range)."},"value":{"type":"string","description":"Value to match. Comparison is string-equality, case-sensitive."},"hasHeader":{"type":"boolean","default":false,"description":"If true, treat the first row as a header: it is excluded from matching and returned separately."}},"required":["range","column","value"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"},"connectionId":{"type":"string"}},"required":["input"]}}}},"responses":{"200":{"description":"Tool result (discriminated union)"},"401":{"description":"Invalid or missing API key"},"429":{"description":"Rate limited"}}}},"/v1/meta-tools/WASSEL_SEARCH_TOOLS":{"post":{"operationId":"WASSEL_SEARCH_TOOLS","summary":"WASSEL_SEARCH_TOOLS","description":"Discover Wassel tools for a task. Returns matching tools with their input schema and whether the underlying integration is connected.","tags":["meta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"What you want to do, in plain language"},"toolkits":{"type":"array","items":{"type":"string"},"description":"Restrict to these integrations, e.g. [\"bosta\"]"}},"required":["query"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Result"}}}},"/v1/meta-tools/WASSEL_MANAGE_CONNECTIONS":{"post":{"operationId":"WASSEL_MANAGE_CONNECTIONS","summary":"WASSEL_MANAGE_CONNECTIONS","description":"List connections, get a connect link for an integration, or disconnect one.","tags":["meta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["list","connect","disconnect"],"description":"\"list\" your connections, \"connect\" an integration, or \"disconnect\" one"},"integration":{"type":"string","description":"Integration id — required when action is \"connect\", e.g. \"bosta\""},"connectionId":{"type":"string","description":"Connection id — required when action is \"disconnect\""}},"required":["action"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Result"}}}},"/v1/meta-tools/WASSEL_EXECUTE_TOOL":{"post":{"operationId":"WASSEL_EXECUTE_TOOL","summary":"WASSEL_EXECUTE_TOOL","description":"Execute a tool discovered via WASSEL_SEARCH_TOOLS with its arguments.","tags":["meta"],"security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Fully-qualified tool name, e.g. \"bosta_create_delivery\""},"input":{"type":"object","additionalProperties":{},"description":"Arguments for the tool"},"connectionId":{"type":"string","description":"Required only when several connections exist for the toolkit"}},"required":["tool","input"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"responses":{"200":{"description":"Result"}}}}}}