{"name":"io.favcrm/favcrm","slug":"favcrm","title":"FavCRM","description":"Agentic CRM for service businesses — bookings, customers, WhatsApp, loyalty, invoicing.","url":"https://mcp.market/server/favcrm","rating":null,"grade":"A","score":87,"certified":false,"status":"active","category":"sales","tags":["sales"],"presence":{"score":23,"stars":0,"forks":1,"downloads_week":null,"last_push_at":"2026-09-15T08:57:29.000Z","license":"MIT"},"uptime":{"percent":100,"checks":28,"ok":28,"last_checked_at":"2026-09-27T15:35:53.721Z","last_ok_at":"2026-09-27T15:35:53.721Z","latency_ms":1408},"claimed":false,"transport":"remote","callable_via_gateway":true,"default_price_micros":0,"repository":"https://github.com/favcrm/mcp","website":"https://favcrm.io","version":"1.0.0","remotes":[{"type":"streamable-http","url":"https://api.favcrm.io/mcp","headers":[{"description":"Optional. A FavCRM MCP key as a Bearer token, or connect via OAuth (the server exposes /.well-known/oauth-authorization-server for automatic auth).","isSecret":true,"placeholder":"Bearer fav_mcp_...","name":"Authorization"}]}],"packages":[],"tools":[{"name":"accept_team_invite_request","description":"Step 1 of agentic team invite acceptance. Validates an invite token and sends a 6-digit verification code to the invited email. Then call accept_team_invite_verify with the code to join and receive an MCP API key.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"token":{"type":"string","description":"Invite token returned by create_team_member_invite or from the invite link"}},"required":["token"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"accept_team_invite_verify","description":"Step 2 of agentic team invite acceptance. Verifies the emailed code, joins the invited user to the company, and returns a one-time MCP API key for that user.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"token":{"type":"string","description":"Invite token returned by create_team_member_invite or from the invite link"},"code":{"type":"string","minLength":6,"maxLength":6,"description":"6-digit code from the invite email"},"name":{"description":"Optional display name when creating a new user","type":"string","minLength":1,"maxLength":120}},"required":["token","code"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"add_knowledge_text","description":"Add a free-form text document to the knowledge base. Use for pasted policies, FAQs, internal notes, brand voice references — anything the agent should be able to retrieve later. Stored as a single document; agent-side embedding/retrieval happens elsewhere.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Friendly title for the document"},"content":{"type":"string","minLength":1,"description":"Document body text"}},"required":["name","content"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"append_post_block","description":"Append one or more blocks to the end of a post. Each block must be a valid block object: { id, version, type, data }. Types: paragraph, heading, image, list, quote, code, divider, spacer, embed, html, youtube, file, faq, callout, gallery, cta, accordion, product.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"blocks":{"minItems":1,"type":"array","items":{"$ref":"#/definitions/__schema0"},"description":"Block(s) to append"}},"required":["postId","blocks"],"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"__schema0":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"paragraph"},"data":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"heading"},"data":{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"text":{"type":"string","minLength":1},"anchor":{"type":"string"}},"required":["level","text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"image"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["url","alt"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"list"},"data":{"type":"object","properties":{"ordered":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ordered","items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"quote"},"data":{"type":"object","properties":{"text":{"type":"string","minLength":1},"cite":{"type":"string"}},"required":["text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"code"},"data":{"type":"object","properties":{"lang":{"type":"string"},"code":{"type":"string","minLength":1}},"required":["lang","code"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"divider"},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"spacer"},"data":{"type":"object","properties":{"size":{"type":"string","enum":["sm","md","lg"]}},"required":["size"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"embed"},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["youtube","vimeo","iframe"]},"url":{"type":"string","format":"uri"},"aspectRatio":{"type":"string"}},"required":["provider","url"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"html"},"data":{"type":"object","properties":{"html":{"type":"string","minLength":1}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"youtube"},"data":{"type":"object","properties":{"videoId":{"type":"string","pattern":"^[A-Za-z0-9_-]{11}$"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"startSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"aspectRatio":{"type":"string"}},"required":["videoId"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"file"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"originalName":{"type":"string","minLength":1},"displayName":{"type":"string"},"icon":{"type":"string","enum":["pdf","doc","image","video","audio","generic"]}},"required":["url","mimeType","sizeBytes","originalName"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"faq"},"data":{"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"question":{"type":"string","minLength":1},"answer":{"type":"string"}},"required":["id","question","answer"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"callout"},"data":{"type":"object","properties":{"tone":{"type":"string","enum":["info","success","warning","danger","note"]},"title":{"type":"string"},"body":{"type":"string","minLength":1}},"required":["tone","body"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"gallery"},"data":{"type":"object","properties":{"layout":{"type":"string","enum":["grid","masonry","carousel"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"}},"required":["url","alt"]}}},"required":["layout","images"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"cta"},"data":{"type":"object","properties":{"label":{"type":"string","minLength":1},"href":{"type":"string","minLength":1},"style":{"type":"string","enum":["primary","secondary","ghost"]},"openInNewTab":{"type":"boolean"}},"required":["label","href"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"accordion"},"data":{"type":"object","properties":{"semantic":{"type":"string","enum":["faq","plain"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"body":{"type":"string"}},"required":["id","title","body"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"product"},"data":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"layout":{"type":"string","enum":["card","inline"]}},"required":["slug"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"columns"},"data":{"type":"object","properties":{"columns":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"span":{"type":"number","exclusiveMinimum":0},"blocks":{"type":"array","items":{"allOf":[{"$ref":"#/definitions/__schema0"}]}}},"required":["blocks"]}},"stackBelow":{"type":"string","pattern":"^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"},"align":{"type":"string","enum":["start","center","stretch"]}},"required":["columns"]}},"required":["id","version","type","data"]}]}}}},{"name":"archive_survey","description":"Archive a survey and remove it from active survey lists.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID to archive"}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"assign_staff_to_service","description":"Assign a staff member to a booking service. Pass users.id from list_staff.userId.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"Service ID"},"userId":{"type":"string","description":"users.id from list_staff.userId"}},"required":["serviceId","userId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"attach_post_cover_from_job","description":"Attach a previously generated ai-media job's output as the post's featuredImage. Use when generate_post_cover timed out (job kept running) or when reusing the same generation across multiple posts. Verifies the job belongs to your company and succeeded. Does NOT charge credits — credits were charged at submit time.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"jobId":{"type":"string","description":"The ai-media job ID (from generate_image, generate_post_cover, or POST /v6/merchant/ai-media/generate)"},"assetIndex":{"description":"Which asset to use when the job produced multiple outputs. Default 0.","type":"integer","minimum":0,"maximum":20},"pollIfRunning":{"description":"When true, advance polling once if the job is still running. Default true.","type":"boolean"},"pollTimeoutMs":{"description":"When pollIfRunning is true, wait up to this long for terminal state. Default 30000.","type":"integer","minimum":0,"maximum":120000}},"required":["postId","jobId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"attach_tags","description":"Attach one or more tags to a member/account. Useful for segmenting members after filtering.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"},"description":"Member/account IDs to tag (max 100)"},"tagId":{"type":"string","description":"Tag ID to attach"}},"required":["accountIds","tagId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"cancel_booking","description":"Cancel a booking and create a durable refund receipt. Uses the merchant refund setting unless refundMethod is provided.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"bookingId":{"type":"string","description":"The booking ID to cancel"},"reason":{"description":"Cancellation reason","type":"string"},"refundMethod":{"description":"Refund cash manually or convert refundable cash to member credit","type":"string","enum":["manual","account_credit"]},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200,"description":"Unique key for this cancellation attempt; reuse it only when retrying the same request"}},"required":["bookingId","idempotencyKey"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"cancel_subscription","description":"Cancel a subscription. Destructive — turns off auto-renew and prevents further billing cycles. Existing paid periods stay valid until end.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Subscription ID"}},"required":["subscriptionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"check_plan_operation","description":"Preflight whether an intended operation is allowed by token scopes, enabled modules, subscription state, and quota. Provide toolName, quotaCode, or moduleCode.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"toolName":{"description":"MCP tool name to preflight, e.g. create_account","type":"string"},"quotaCode":{"description":"Quota code to check, e.g. contacts or mcp_calls_per_minute","type":"string"},"moduleCode":{"description":"Module code to check, e.g. whatsapp or crm","type":"string"},"delta":{"default":1,"description":"Planned usage increment. Currently quota checks are single-resource preflights.","type":"integer","minimum":1,"maximum":9007199254740991}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"clone","description":"Duplicate an existing record (product, tier, campaign, post, service package, promotion, gift offer). Creates a copy in DRAFT status with \"(Copy)\" appended to the name.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["product","tier","campaign","post","service_package","promotion","gift_offer"],"description":"Type of entity to clone"},"entityId":{"type":"string","description":"ID of the entity to clone"},"name":{"description":"Override the name of the cloned entity (defaults to \"Original Name (Copy)\")","type":"string"}},"required":["entityType","entityId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"commit_customer_import","description":"Commit a previewed customer import. Pass the same rows and sessionId returned by preview_customer_import. Creates/updates accounts and applies points, stamps, and credit deltas.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"description":"sessionId from preview_customer_import"},"rows":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"1-based row number from the source file (for error reporting)"},"name":{"description":"Display name","anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"membershipTier":{"description":"Tier name or ID","anyOf":[{"type":"string"},{"type":"null"}]},"points":{"description":"Target loyalty points (分數)","anyOf":[{"type":"number"},{"type":"null"}]},"stamps":{"anyOf":[{"type":"number"},{"type":"null"}]},"credit":{"description":"Target wallet stored value / 儲值 (HKD)","anyOf":[{"type":"number"},{"type":"null"}]},"expiryDate":{"description":"Membership expiry YYYY-MM-DD","anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"description":"Internal notes","anyOf":[{"type":"string"},{"type":"null"}]},"memberCode":{"description":"Merchant member code (e.g. LIZLAB-00144)","anyOf":[{"type":"string"},{"type":"null"}]},"referredBy":{"description":"Referrer account UUID, member code, phone, or email","anyOf":[{"type":"string"},{"type":"null"}]},"lifeStage":{"anyOf":[{"type":"string","enum":["lead","active","churned","vip"]},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["walk_in","online","pos","whatsapp","referral","import","api","shopify","woocommerce","email"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["individual","business","household"]},{"type":"null"}]},"gender":{"anyOf":[{"type":"string"},{"type":"null"}]},"dateOfBirth":{"description":"YYYY-MM-DD","anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"description":"Comma-separated tag names","anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"description":"Account custom fields keyed by fieldName","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"type":"null"}]}},"required":["rowNumber"]}}},"required":["sessionId","rows"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"complete_booking","description":"Mark a booking as completed. Triggers commission calculation if configured.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"bookingId":{"type":"string","description":"The booking ID to complete"}},"required":["bookingId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"confirm_booking","description":"Confirm a pending booking.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"bookingId":{"type":"string","description":"The booking ID to confirm"}},"required":["bookingId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"convert_lead","description":"Convert an account: qualify its open lead (creating one if needed) and link exactly one pipeline deal. Also promotes lifeStage lead -> active. Safe to repeat — a second call lands on the same lead and deal. Works on accounts that are already active.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"Lead account ID"},"createDeal":{"description":"Deprecated and ignored — a convert always links a deal","type":"boolean"},"dealName":{"description":"Optional deal name","type":"string"},"dealAmount":{"description":"Optional deal amount","type":"number"},"dealStage":{"description":"Optional initial deal stage (\"lead\" is an alias of \"discovery\")","type":"string","enum":["discovery","qualified","proposal","negotiation","won","lost","lead","new","open"]},"dealClosingDate":{"description":"Optional deal close date","type":"string"},"lifeStage":{"description":"Lifecycle after convert (default active)","type":"string","enum":["active","vip"]}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"copy_service_tier_pricing","description":"Copy the complete pricing and booking-policy configuration from one membership tier to another on the same booking service.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Booking service ID"},"sourceTierId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Membership tier to copy from"},"targetTierId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Membership tier to replace"}},"required":["serviceId","sourceTierId","targetTierId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_account","description":"Create a CRM account/customer with a primary contact. Optionally enroll the account as a member; use enrol_membership later when the account already exists.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Account/customer display name"},"firstName":{"description":"First name for individual accounts","type":"string"},"lastName":{"description":"Last name for individual accounts","type":"string"},"email":{"description":"Email address","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"Phone number","type":"string"},"type":{"description":"Account type. Defaults to individual.","type":"string","enum":["individual","business","household"]},"lifeStage":{"description":"CRM life stage. Defaults to active.","type":"string","enum":["lead","active","churned","vip"]},"source":{"description":"Acquisition source. Defaults to api.","type":"string","enum":["walk_in","online","pos","whatsapp","referral","import","api","shopify","woocommerce","email"]},"notes":{"description":"Internal notes","type":"string"},"enrollMembership":{"description":"Whether to create an active membership immediately","type":"boolean"},"tierId":{"description":"Membership tier ID to enroll into. If omitted, the company default tier may apply.","type":"string"},"expiresAt":{"description":"Optional ISO expiry for the membership","type":"string"},"address":{"description":"Postal address","type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postalCode":{"type":"string"}}}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_booking","description":"Create a new booking for a member. Use get_available_slots first to find valid times, then create the booking with the service, member, date, and time.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"The service ID"},"accountId":{"type":"string","description":"The member/account ID"},"bookingDate":{"type":"string","description":"Date in YYYY-MM-DD format"},"startTime":{"type":"string","description":"Start time in HH:MM format"},"endTime":{"type":"string","description":"End time in HH:MM format"},"staffId":{"description":"Staff member ID","type":"string"},"resourceId":{"description":"Resource ID","type":"string"},"notes":{"description":"Booking notes","type":"string"}},"required":["serviceId","accountId","bookingDate","startTime","endTime"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_broadcast","description":"Create a DRAFT WhatsApp or SMS broadcast campaign. The broadcast is NOT sent — admin must review and send it from the Broadcasts page.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Campaign name"},"channel":{"description":"Channel (default whatsapp)","type":"string","enum":["whatsapp","sms"]},"templateId":{"description":"Message template ID to use","type":"string"},"recipientFilter":{"description":"Audience for this draft. Omit for all customers, use { tagIds: [\"...\"] } for the legacy tag filter, or provide recipientType with the required recipientIds, segmentId, or tierId.","anyOf":[{"type":"object","properties":{"recipientType":{"type":"string","const":"all"},"tagIds":{"type":"array","items":{"type":"string"}}},"required":["recipientType"]},{"type":"object","properties":{"recipientType":{"type":"string","const":"individual"},"recipientIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["recipientType","recipientIds"]},{"type":"object","properties":{"recipientType":{"type":"string","const":"segment"},"segmentId":{"type":"string","minLength":1}},"required":["recipientType","segmentId"]},{"type":"object","properties":{"recipientType":{"type":"string","const":"tier"},"tierId":{"type":"string","minLength":1}},"required":["recipientType","tierId"]},{"type":"object","properties":{"tagIds":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["tagIds"]}]},"scheduledAt":{"description":"ISO date to schedule the broadcast","type":"string"}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_campaign","description":"Create an email, SMS, WhatsApp, or push campaign in DRAFT. audienceExclusions can omit specific account IDs and recipients of previous campaign IDs. For email channelConfig, use subject + htmlBody + optional plainTextBody. recipientSource=\"list\" is accepted as an alias for \"individual\".","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Campaign name (internal)"},"channel":{"type":"string","enum":["sms","email","whatsapp","push"],"description":"email | sms | whatsapp | push"},"status":{"description":"Default DRAFT","type":"string","enum":["DRAFT","SCHEDULED"]},"recipientSource":{"description":"Where to source recipients from. \"list\" is normalized to \"individual\".","type":"string","enum":["all","segment","individual","csv","list"]},"segmentId":{"description":"Required if recipientSource=\"segment\"","anyOf":[{"type":"string"},{"type":"null"}]},"recipientIds":{"description":"Required if recipientSource=\"individual\", \"list\", or \"csv\"; values are account IDs","type":"array","items":{"type":"string"}},"audienceExclusions":{"description":"Optional exclusions: accountIds contains specific customer account IDs; campaignIds contains previous campaign IDs whose accepted recipients must be omitted. A recipient matching any rule is excluded.","type":"object","properties":{"accountIds":{"default":[],"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"campaignIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}}},"channelConfig":{"description":"Channel-specific config: subject + htmlBody for email, body for sms/whatsapp, templateId, etc. Legacy email html is normalized to htmlBody.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"scheduledAt":{"description":"ISO datetime for scheduled send (status must be SCHEDULED)","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","channel"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_category","description":"Create a CMS post category (e.g. \"Equipment\", \"Injection — Botox\"). For sub-categories, use namespaced names — the table is flat.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Category name"},"slug":{"description":"Auto-generated from name if omitted.","type":"string"},"description":{"description":"Description","type":"string"},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_contact","description":"Create a contact on an existing CRM account.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"Owning account ID"},"name":{"type":"string","description":"Contact name"},"email":{"description":"Email","type":"string"},"phone":{"description":"Phone","type":"string"},"jobTitle":{"description":"Job title","type":"string"},"isPrimary":{"description":"Mark as primary contact","type":"boolean"}},"required":["accountId","name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_custom_field","description":"Create a custom field definition for CRM entities. Use options for select or multiselect fields.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","booking","ticket","product","post"],"description":"Entity type, e.g. account, contact, deal, booking"},"fieldName":{"type":"string","minLength":1,"description":"Stable machine name, e.g. preferred_branch"},"fieldLabel":{"type":"string","minLength":1,"description":"Human-readable label, e.g. Preferred branch"},"fieldType":{"type":"string","enum":["text","number","date","select","multiselect","boolean","url","email","phone"],"description":"Field type"},"options":{"description":"Allowed values for select/multiselect fields","type":"array","items":{"type":"string"}},"isRequired":{"description":"Whether this field is required","type":"boolean"},"sortOrder":{"description":"Display order","type":"number"}},"required":["entityType","fieldName","fieldLabel","fieldType"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_deal","description":"Create a CRM sales pipeline deal, optionally linked to a customer account and contact.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Deal name"},"accountId":{"description":"Linked CRM account ID","anyOf":[{"type":"string"},{"type":"null"}]},"contactId":{"description":"Linked contact ID","anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"description":"Deal amount","anyOf":[{"type":"number"},{"type":"null"}]},"closingDate":{"description":"Expected closing date","anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"description":"Pipeline stage","anyOf":[{"type":"string"},{"type":"null"}]},"probability":{"description":"Win probability, e.g. 25","anyOf":[{"type":"string"},{"type":"null"}]},"dealType":{"description":"Deal type/category","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"description":"Deal notes or description","anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"description":"Owner user/team member ID","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_inbox_reply_suggestion","description":"Create a draft reply suggestion that appears inline in the FavCRM Inbox composer. Use this for message.inbound events with replyPolicy=\"suggest\"; it does not send anything to the customer.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"conversationId":{"type":"string","minLength":1,"description":"Inbox conversation ID"},"agentId":{"type":"string","minLength":1,"description":"AI colleague ID creating the suggestion"},"body":{"type":"string","minLength":1,"maxLength":8000,"description":"Draft reply text for the merchant to review"},"sourceMessageId":{"description":"Inbound message ID this draft responds to","type":"string"},"subject":{"description":"Optional email subject suggestion","type":"string","maxLength":500},"metadata":{"description":"Optional metadata such as rationale, confidence, or source refs","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["conversationId","agentId","body"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_invoice","description":"Create a new invoice for a customer. Optionally include line items inline. Returns the new invoiceId.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"Customer accountId (CRM account)"},"currency":{"description":"ISO currency code (defaults to company default)","type":"string"},"dueDate":{"description":"Due date (ISO 8601 date)","type":"string"},"notes":{"description":"Free-form notes shown on the invoice","type":"string"},"lineItems":{"description":"Line items to bill — totals are computed server-side","type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Line item description"},"quantity":{"description":"Quantity (default 1)","type":"number"},"unitPrice":{"type":"string","description":"Unit price as decimal string, e.g. \"100.00\""}},"required":["description","unitPrice"]}}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_note","description":"Add a note to a member/account, booking, ticket, or invoice.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","booking","ticket","invoice"],"description":"Type of entity"},"entityId":{"type":"string","description":"The entity ID"},"body":{"type":"string","description":"Note content"},"isPinned":{"description":"Pin this note to the top","type":"boolean"}},"required":["entityType","entityId","body"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_offer_rule","description":"Create an upsell/cross-sell offer rule as draft. Specify trigger type, conditions, and suggested products with optional discounts.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Rule name"},"description":{"description":"Rule description","type":"string"},"type":{"type":"string","enum":["upsell","cross_sell","bundle","post_purchase"],"description":"Rule type: upsell, cross_sell, bundle, or post_purchase"},"triggerType":{"type":"string","enum":["product_view","cart_contains","cart_threshold","post_order","category_view"],"description":"When the offer triggers"},"triggerConfig":{"description":"Trigger-specific configuration","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"products":{"description":"Products to suggest with optional discounts","type":"array","items":{"type":"object","properties":{"productId":{"type":"number","description":"Product ID to suggest"},"discountType":{"description":"Discount type","type":"string","enum":["percentage","fixed_amount"]},"discountValue":{"description":"Discount value","type":"string"}},"required":["productId"]}}},"required":["name","type","triggerType"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_outlet","description":"Create a shop outlet/location. Optionally pass id to preserve a legacy UUID during migration.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"id":{"description":"Optional outlet UUID (for legacy migration; non-standard formats accepted)","type":"string"},"name":{"type":"string","description":"Outlet name"},"address":{"description":"Street address","anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"description":"Contact phone","anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"description":"Latitude","anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"longitude":{"description":"Longitude","anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"logoUrl":{"description":"Logo URL","anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"description":"Display sort order (default 0)","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isActive":{"description":"Whether outlet is active (default true)","type":"boolean"},"acceptsOrders":{"description":"Whether outlet accepts online orders (default true)","type":"boolean"}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_plan_upgrade_link","description":"Create a Stripe Checkout link for a new paid subscription, or a Stripe Billing Portal link for an existing Stripe subscription. Use only after the user explicitly asks to upgrade or fix billing.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"planId":{"description":"Target plan ID. Use list_plan_options first if unknown.","type":"string"},"planCode":{"description":"Target plan code, e.g. favcrm-lite. Either planId or planCode is required.","type":"string"},"billingCycle":{"default":"monthly","type":"string","enum":["monthly","yearly"]},"returnUrl":{"description":"Where Stripe should return after checkout/portal. Defaults to merchant billing settings.","type":"string","format":"uri"},"confirm":{"default":false,"description":"Required true to create a Stripe-hosted payment or billing link.","type":"boolean"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_post","description":"Create a new CMS post (blog_post, page, or any custom post type). The post type must already exist — use list_post_types to discover, create_post_type to add a new one. excerpt = plain-text summary only (auto-derived from blocks if omitted). Structured custom fields go in meta, keyed by the field schema defined with create_post_type_field.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"type":{"type":"string","description":"Post type slug (e.g. blog_post, page, treatment). Must exist in post_types for this company."},"title":{"type":"string","description":"Post title"},"slug":{"description":"URL slug. Auto-generated from title if omitted; collisions get -2, -3 suffix.","type":"string"},"blocks":{"description":"Ordered array of content blocks. Each block has { id, version, type, data } where type is one of: paragraph, heading, image, list, quote, code, divider, spacer, embed, html, youtube, file, faq, callout, gallery, cta, accordion, product, columns. Unknown types are rejected.","type":"array","items":{"$ref":"#/definitions/__schema0"}},"excerpt":{"description":"Plain-text summary only — never JSON. Auto-derived from the first paragraph/heading block if omitted and the post type supports excerpts.","type":"string"},"featuredImage":{"description":"Cover image URL","type":"string"},"status":{"description":"Status (default draft)","type":"string","enum":["draft","scheduled","published","archived"]},"visibility":{"description":"Visibility (default public)","type":"string","enum":["public","private","members_only"]},"categoryIds":{"description":"Category IDs (post types with supportsCategories only)","type":"array","items":{"type":"string"}},"tagIds":{"description":"Tag IDs to attach to the post","type":"array","items":{"type":"string"}},"meta":{"description":"Structured custom field values, keyed by field key (see list_post_type_fields). Validated against the post type field schema. Use this for all machine-readable data — never put JSON in excerpt.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"seoTitle":{"description":"SEO title override","type":"string"},"seoDescription":{"description":"SEO meta description","type":"string"},"parentId":{"description":"Parent post ID for nested types (e.g. pages).","anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"},"publishedAt":{"description":"ISO timestamp; required when status=scheduled.","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","title"],"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"__schema0":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"paragraph"},"data":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"heading"},"data":{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"text":{"type":"string","minLength":1},"anchor":{"type":"string"}},"required":["level","text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"image"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["url","alt"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"list"},"data":{"type":"object","properties":{"ordered":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ordered","items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"quote"},"data":{"type":"object","properties":{"text":{"type":"string","minLength":1},"cite":{"type":"string"}},"required":["text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"code"},"data":{"type":"object","properties":{"lang":{"type":"string"},"code":{"type":"string","minLength":1}},"required":["lang","code"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"divider"},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"spacer"},"data":{"type":"object","properties":{"size":{"type":"string","enum":["sm","md","lg"]}},"required":["size"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"embed"},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["youtube","vimeo","iframe"]},"url":{"type":"string","format":"uri"},"aspectRatio":{"type":"string"}},"required":["provider","url"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"html"},"data":{"type":"object","properties":{"html":{"type":"string","minLength":1}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"youtube"},"data":{"type":"object","properties":{"videoId":{"type":"string","pattern":"^[A-Za-z0-9_-]{11}$"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"startSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"aspectRatio":{"type":"string"}},"required":["videoId"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"file"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"originalName":{"type":"string","minLength":1},"displayName":{"type":"string"},"icon":{"type":"string","enum":["pdf","doc","image","video","audio","generic"]}},"required":["url","mimeType","sizeBytes","originalName"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"faq"},"data":{"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"question":{"type":"string","minLength":1},"answer":{"type":"string"}},"required":["id","question","answer"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"callout"},"data":{"type":"object","properties":{"tone":{"type":"string","enum":["info","success","warning","danger","note"]},"title":{"type":"string"},"body":{"type":"string","minLength":1}},"required":["tone","body"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"gallery"},"data":{"type":"object","properties":{"layout":{"type":"string","enum":["grid","masonry","carousel"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"}},"required":["url","alt"]}}},"required":["layout","images"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"cta"},"data":{"type":"object","properties":{"label":{"type":"string","minLength":1},"href":{"type":"string","minLength":1},"style":{"type":"string","enum":["primary","secondary","ghost"]},"openInNewTab":{"type":"boolean"}},"required":["label","href"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"accordion"},"data":{"type":"object","properties":{"semantic":{"type":"string","enum":["faq","plain"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"body":{"type":"string"}},"required":["id","title","body"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"product"},"data":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"layout":{"type":"string","enum":["card","inline"]}},"required":["slug"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"columns"},"data":{"type":"object","properties":{"columns":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"span":{"type":"number","exclusiveMinimum":0},"blocks":{"type":"array","items":{"allOf":[{"$ref":"#/definitions/__schema0"}]}}},"required":["blocks"]}},"stackBelow":{"type":"string","pattern":"^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"},"align":{"type":"string","enum":["start","center","stretch"]}},"required":["columns"]}},"required":["id","version","type","data"]}]}}}},{"name":"create_post_type","description":"Define a new custom post type (e.g. \"treatment\", \"service\"). Required before creating posts of that type. After creating a post type, use create_post_type_field to define its structured field schema. Those fields are stored in meta on each post — do not use excerpt for structured data.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"slug":{"type":"string","description":"Lowercase identifier, e.g. \"treatment\". Auto-derived from label if omitted."},"label":{"type":"string","description":"Singular UI label, e.g. \"Treatment\""},"labelPlural":{"type":"string","description":"Plural UI label, e.g. \"Treatments\""},"icon":{"description":"Icon name or URL","anyOf":[{"type":"string"},{"type":"null"}]},"supportsCategories":{"description":"Default true","type":"boolean"},"supportsFeaturedImage":{"description":"Default true","type":"boolean"},"supportsNesting":{"description":"Default false","type":"boolean"},"supportsExcerpt":{"description":"Default true","type":"boolean"},"supportsBlocks":{"description":"Default true","type":"boolean"},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"}},"required":["slug","label","labelPlural"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_post_type_field","description":"Add a custom field to a post type schema. The field key becomes the key in meta when creating/updating posts. Use fieldType=\"repeater\" with fields=[...] for repeatable structured rows. Use this instead of storing structured data in excerpt.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID (from list_post_types)"},"label":{"type":"string","description":"Human-readable field label, e.g. \"Tagline\""},"fieldType":{"type":"string","enum":["text","textarea","richtext","number","boolean","date","datetime","select","multiselect","url","email","image","file","gallery","attachments","repeater"],"description":"Field type: text | textarea | richtext | number | boolean | date | datetime | select | multiselect | url | email | image | file | gallery | attachments | repeater"},"key":{"description":"snake_case key used in meta. Auto-derived from label if omitted.","type":"string"},"required":{"description":"Whether the field is required on post creation (default false)","type":"boolean"},"helpText":{"description":"Optional hint shown in the UI","type":"string"},"options":{"description":"For select/multiselect: { choices: [{ label, value }] }. For URL fields that should accept merchant uploads, use { uploadable: true } so the UI stores the uploaded file URL instead of asking the merchant to paste a raw URL.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"fields":{"description":"Required for fieldType=\"repeater\". Defines the child fields stored in each row object.","type":"array","items":{"type":"object","properties":{"key":{"description":"snake_case key for this repeater child field. Auto-derived from label if omitted.","type":"string"},"label":{"type":"string","description":"Human-readable child field label"},"fieldType":{"type":"string","enum":["text","textarea","richtext","number","boolean","date","datetime","select","multiselect","url","email","image","file","gallery","attachments","repeater"],"description":"Child field type. Repeaters support scalar/select types plus singular upload fields: text, textarea, richtext, number, boolean, date, datetime, select, multiselect, url, email, image, file. Nested repeaters and array upload fields are not supported."},"required":{"description":"Whether this child field is required on every repeater row","type":"boolean"},"helpText":{"description":"Optional hint shown in the UI","type":"string"},"options":{"description":"For select/multiselect child fields: { choices: [\"a\",\"b\"] }.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sortOrder":{"type":"number"}},"required":["label","fieldType"]}},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"}},"required":["postTypeId","label","fieldType"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_product","description":"Create a new shop product as DRAFT. Merchant can review and activate from the portal.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Product name"},"description":{"description":"Product description","type":"string"},"price":{"type":"string","description":"Price as decimal string (e.g. \"29.99\")"},"discountPrice":{"description":"Discounted price","type":"string"},"memberPrice":{"description":"Members-only price","type":"string"},"sku":{"description":"SKU code","type":"string"},"categoryIds":{"description":"Category IDs (first is primary)","type":"array","items":{"type":"number"}},"productType":{"description":"Product type (default one_time)","type":"string","enum":["one_time","recurring"]}},"required":["name","price"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_product_category","description":"Create a product category. Use parentId to create subcategories under an existing category.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Category name"},"description":{"description":"Category description","type":"string"},"parentId":{"description":"Parent category ID for subcategories","type":"number"},"onlineEnabled":{"description":"Show in online store (default true)","type":"boolean"},"sortOrder":{"description":"Display sort order","type":"number"}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_promotion","description":"Create a promotion / discount code. type=percentage or fixed_amount; value is the discount as a string (\"10\" = 10% or 10 currency units). Codes are uppercased server-side.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Promotion name (internal)"},"code":{"type":"string","description":"Coupon code customers enter at checkout (auto-uppercased)"},"value":{"type":"string","description":"Discount value as decimal string"},"type":{"description":"Default percentage","type":"string","enum":["percentage","fixed_amount"]},"description":{"description":"Description","type":"string"},"maximumDiscount":{"description":"Cap on percentage discounts, decimal string","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"Default active","type":"string","enum":["active","inactive","expired"]},"startsAt":{"description":"ISO datetime — when the promo becomes valid","anyOf":[{"type":"string"},{"type":"null"}]},"endsAt":{"description":"ISO datetime — when the promo expires","anyOf":[{"type":"string"},{"type":"null"}]},"usageLimitTotal":{"description":"Max total uses across all customers","anyOf":[{"type":"number"},{"type":"null"}]},"usageLimitPerCustomer":{"description":"Max uses per single customer","anyOf":[{"type":"number"},{"type":"null"}]},"minimumAmount":{"description":"Minimum order amount required, decimal string","anyOf":[{"type":"string"},{"type":"null"}]},"minimumQuantity":{"description":"Minimum item count required","anyOf":[{"type":"number"},{"type":"null"}]},"bookingEnabled":{"description":"Allow on bookings","type":"boolean"},"eventEnabled":{"description":"Allow on event registrations","type":"boolean"},"onlineEnabled":{"description":"Allow on online shop orders","type":"boolean"},"posEnabled":{"description":"Allow at POS","type":"boolean"}},"required":["name","code","value"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_resource","description":"Create a bookable resource (room, equipment, vehicle). Used by services that have requiresResource=true.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Resource name (e.g. \"Treatment Room A\")"},"type":{"type":"string","description":"Free-form type label, e.g. \"room\", \"equipment\""},"description":{"description":"Description","type":"string"},"capacity":{"description":"How many concurrent bookings (default 1)","type":"number"},"status":{"description":"Default active","type":"string","enum":["active","inactive"]}},"required":["name","type"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_segment","description":"Create a new customer segment. Use STATIC for manual member lists, DYNAMIC for criteria-based auto-filtering.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Segment name"},"description":{"description":"Segment description","type":"string"},"segmentType":{"description":"Segment type (default DYNAMIC)","type":"string","enum":["STATIC","DYNAMIC"]},"criteria":{"description":"Dynamic segment criteria","type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"],"description":"How to combine conditions"},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"},"operator":{"type":"string","description":"Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"},"threshold":{"description":"Numeric threshold for numeric conditions","type":"number"},"days":{"description":"Days window for time-based conditions","type":"number"},"value":{"description":"Single value for text/date/selection/custom-field conditions","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"values":{"description":"Multiple values for IN/NOT_IN conditions","type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"definitionId":{"description":"Custom field definition ID for custom-field segment conditions","type":"string"},"fieldName":{"description":"Custom field name for custom-field segment conditions","type":"string"},"fieldType":{"description":"Custom field type for custom-field segment conditions","type":"string"}},"required":["type","operator"]},"description":"Filter conditions"}},"required":["operator","conditions"]}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_service","description":"Create a bookable service. Sets duration, price, capacity, and policies. Use list_service_categories first if you want to attach to an existing category.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Service name"},"durationMinutes":{"type":"number","description":"Duration of one booking in minutes"},"price":{"description":"Decimal string, e.g. \"80.00\". Defaults to \"0\".","type":"string"},"currency":{"description":"ISO currency code, default HKD","type":"string"},"capacity":{"description":"How many participants per slot (default 1)","type":"number"},"categoryId":{"description":"Existing service category ID","type":"string"},"description":{"description":"Description","type":"string"},"type":{"description":"Default one_on_one","type":"string","enum":["one_on_one","group","class"]},"cooldownMinutes":{"description":"Minimum gap before bookings can be cancelled (default 0)","type":"number"},"requiresStaff":{"description":"Whether the service requires staff assignment","type":"boolean"},"requiresResource":{"description":"Whether the service requires a resource (room/equipment)","type":"boolean"},"requiresConfirmation":{"description":"If true, bookings start as pending and need confirm_booking","type":"boolean"},"requireLogin":{"description":"Default true — guests cannot book","type":"boolean"},"visibility":{"description":"Visibility: public | members_only | hidden","type":"string","enum":["public","members_only","hidden"]},"allowedTierIds":{"description":"Required when visibility=members_only","type":"array","items":{"type":"string"}},"status":{"description":"Default active","type":"string","enum":["active","inactive","archived"]},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"},"commissionType":{"description":"Commission type: \"fixed\" or \"percentage\"","anyOf":[{"type":"string","enum":["fixed","percentage"]},{"type":"null"}]},"commissionValue":{"description":"Commission amount as decimal string","anyOf":[{"type":"string"},{"type":"null"}]},"commissionCurrency":{"description":"Commission currency (ISO code)","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","durationMinutes"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_service_category","description":"Create a service category (e.g. \"Treatments\", \"Classes\") to group bookable services.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","description":"Category name"},"description":{"description":"Description","type":"string"},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_service_package","description":"Create a service package/prepaid session bundle. Use applicableType=SELECTED with applicableItems to limit the package to specific booking services or events.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Package name"},"description":{"description":"Description","type":"string"},"sessionCount":{"type":"integer","minimum":1,"maximum":100,"description":"Number of included sessions"},"price":{"type":"number","minimum":0,"description":"Package price"},"validDays":{"type":"integer","minimum":1,"maximum":3650,"description":"Validity window after purchase, in days"},"applicableType":{"description":"Default ALL","type":"string","enum":["ALL","ALL_BOOKINGS","ALL_EVENTS","SELECTED"]},"status":{"description":"Default ACTIVE","type":"string","enum":["ACTIVE","INACTIVE"]},"applicableItems":{"description":"Items used when applicableType=SELECTED","type":"array","items":{"type":"object","properties":{"itemType":{"type":"string","enum":["booking_service","event"]},"itemId":{"type":"string"}},"required":["itemType","itemId"]}}},"required":["name","sessionCount","price","validDays"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_service_schedule","description":"Create a bookable schedule window for a service, including recurring weekly/daily availability.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"Service ID"},"date":{"type":"string","description":"Start date or one-off date (YYYY-MM-DD)"},"startTime":{"type":"string","description":"HH:MM (24h)"},"endTime":{"type":"string","description":"HH:MM (24h)"},"maxCapacity":{"description":"Max bookings per generated slot","type":"number"},"staffId":{"description":"Optional companyMembers.id to bind this schedule to staff","type":"string"},"resourceId":{"description":"Optional resource ID to bind this schedule to a room/resource","type":"string"},"recurrence":{"description":"Default none","type":"string","enum":["none","daily","weekly","monthly"]},"recurrenceInterval":{"description":"Default 1","type":"number"},"byWeekday":{"description":"Weekdays for weekly recurrence: 0=Mon, 1=Tue, ... 6=Sun","type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"recurrenceEndDate":{"description":"YYYY-MM-DD","type":"string"},"notes":{"description":"Free-form notes","type":"string"}},"required":["serviceId","date","startTime","endTime"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_subscription","description":"Create a manual, non-renewing subscription record for a member. Use a subscription action link for provider-backed recurring billing.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"Customer accountId"},"tierId":{"description":"Membership tier ID — if set, amount/currency default from the tier","type":"string"},"billingCycle":{"description":"Billing cycle (default monthly)","type":"string","enum":["monthly","quarterly","yearly","one_off"]},"amount":{"description":"Override amount per cycle (otherwise derived from tier)","type":"number"},"currency":{"description":"ISO currency code (otherwise derived from tier or company default)","type":"string"},"autoRenew":{"description":"Manual records cannot auto-renew","type":"boolean","const":false},"currentPeriodStart":{"description":"Period start (ISO 8601). Defaults to now.","type":"string"},"currentPeriodEnd":{"description":"Period end (ISO 8601). Defaults to start + cycle.","type":"string"}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_survey","description":"Create a survey with custom question blocks. Publish it later or set status to published for immediate portal access.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"description":"Survey title"},"description":{"description":"Optional survey description","type":"string"},"slug":{"description":"Optional URL slug; generated from title when omitted","type":"string"},"status":{"description":"Initial status","type":"string","enum":["draft","published","closed","archived"]},"visibility":{"description":"Who can access the survey","type":"string","enum":["public","members_only","token_only","private"]},"questionBlocks":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Ordered survey question blocks"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Survey settings such as allowMultipleResponses, collectEmail, collectIpAddress, requireAuthentication, showProgress, successMessage"},"openAt":{"description":"Optional ISO datetime when the survey opens","type":"string"},"closeAt":{"description":"Optional ISO datetime when the survey closes","type":"string"}},"required":["title","questionBlocks"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_survey_invitation","description":"Create a token-auth survey invitation for a specific member/account or contact.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"},"accountId":{"description":"CRM account ID to invite","type":"string"},"contactId":{"description":"Contact ID to invite","type":"string"},"recipientEmail":{"description":"Recipient email for link tracking","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"recipientPhone":{"description":"Recipient phone for link tracking","type":"string"},"recipientName":{"description":"Recipient display name for link tracking","type":"string"},"channel":{"description":"Intended channel, e.g. email, sms, whatsapp, link","type":"string"},"expiresAt":{"description":"Optional invitation expiry ISO datetime","type":"string"},"metadata":{"description":"Optional invitation metadata","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_tag","description":"Create a CRM tag for customer segmentation and organization.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Tag name"},"color":{"description":"Optional display color, e.g. #2563eb","type":"string"}},"required":["name"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_task","description":"Create a task. Optionally link to a CRM account or assign to a team member.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"title":{"type":"string","description":"Task title"},"description":{"description":"Description","type":"string"},"priority":{"description":"Priority","type":"string","enum":["low","medium","high","urgent"]},"status":{"description":"Status filter","type":"string","enum":["todo","in_progress","blocked","done"]},"assigneeId":{"description":"company_members.id","type":"string"},"accountId":{"description":"Linked CRM account","type":"string"},"dueDate":{"description":"ISO date (YYYY-MM-DD)","type":"string"}},"required":["title"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_team_member_invite","description":"Invite a team member to this company and return a one-time MCP accept token. The invited user must verify an email code through accept_team_invite_request and accept_team_invite_verify before membership and API key issuance.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Invitee email address"},"name":{"description":"Optional display name for a new user","type":"string","minLength":1,"maxLength":120},"role":{"default":"staff","description":"Team member role to grant on acceptance","type":"string","enum":["manager","staff"]},"permissions":{"description":"Optional structured module permissions to attach to the company member","type":"array","items":{"type":"object","properties":{"module":{"type":"string"},"resource":{"type":"string"},"actions":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["actions"]}},"modules":{"description":"Optional legacy module list to attach to the company member","type":"array","items":{"type":"string"}},"expiresInHours":{"description":"Invite lifetime in hours. Defaults to 72, max 336.","type":"integer","minimum":1,"maximum":336}},"required":["email"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_template","description":"Create and submit a WhatsApp message template to Meta for approval. Text templates only (header text, body with {{1}} variables, footer) — add buttons in the app. The template is NOT usable until Meta approves it (check with list_templates). Submitting consumes the store’s Meta template allowance.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Friendly template name (a Meta-safe id is derived from it)."},"category":{"type":"string","enum":["MARKETING","UTILITY","AUTHENTICATION"],"description":"UTILITY = transactional (order/shipping), MARKETING = promos, AUTHENTICATION = codes."},"message":{"type":"string","minLength":1,"description":"Body text. Use {{1}}, {{2}} for personalised values."},"language":{"description":"Language code, default en_US.","type":"string"},"headerText":{"description":"Optional short bold header above the body.","type":"string"},"footer":{"description":"Optional small footer text.","type":"string"},"variableSamples":{"description":"Example values per variable number, e.g. {\"1\":\"Sara\"} — Meta reviews with these.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["name","category","message"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_ticket","description":"Create a support ticket for a member issue.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"subject":{"type":"string","description":"Ticket subject/title"},"description":{"description":"Detailed description of the issue","type":"string"},"category":{"description":"Ticket category","type":"string","enum":["bug","feature_request","account","billing","general","other"]},"priority":{"description":"Ticket priority","type":"string","enum":["critical","high","medium","low"]},"source":{"description":"Where the ticket originated","type":"string","enum":["portal","email","phone","walk_in","api","mobile_app"]},"accountId":{"description":"Member/account ID this ticket is about","type":"string"},"contactName":{"description":"Contact name if no account ID","type":"string"},"contactEmail":{"description":"Contact email if no account ID","type":"string"},"contactPhone":{"description":"Contact phone if no account ID","type":"string"}},"required":["subject"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_variation","description":"Add a variation (size, color, etc.) to an existing product.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"productId":{"type":"number","description":"The product ID"},"name":{"description":"Variation name","type":"string"},"sku":{"description":"Variation SKU","type":"string"},"price":{"type":"string","description":"Price as decimal string (e.g. \"29.99\")"},"discountPrice":{"description":"Discounted price","type":"string"},"memberPrice":{"description":"Members-only price","type":"string"},"stockQuantity":{"description":"Stock quantity","type":"number"},"stockStatus":{"description":"Stock status","type":"string","enum":["in_stock","out_of_stock","low_stock"]},"selectedOptions":{"description":"Option selections e.g. {\"Size\": \"Large\"}","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["productId","price"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"create_whatsapp_connect_link","description":"Create a short-lived browser link for WhatsApp Business Embedded Signup. The user must open the link because Meta requires a browser popup to authorize and choose the WABA/phone number.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"onboardingMode":{"default":"cloud_api","description":"Use cloud_api for a new WhatsApp Cloud API connection, or coexistence when connecting a WhatsApp Business App number.","type":"string","enum":["cloud_api","coexistence"]},"ttlMinutes":{"description":"Connect link lifetime in minutes. Defaults to 30.","type":"integer","minimum":5,"maximum":1440}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_account","description":"Soft-delete a CRM account/customer. This releases the primary phone for future reuse while keeping account history for audit.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The account ID to soft-delete"}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_campaign","description":"Delete a campaign. Only allowed in DRAFT status; sent campaigns are kept for audit history.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID"}},"required":["campaignId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_category","description":"Delete a CMS post category. Posts in the category are not deleted; they are simply unlinked.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"categoryId":{"type":"string","description":"Category ID"}},"required":["categoryId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_contact","description":"Delete a secondary contact. Primary contacts are protected; set another primary contact or delete the account instead.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"contactId":{"type":"string","description":"The contact ID to delete"}},"required":["contactId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_custom_field","description":"Delete a custom field definition and its stored values.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"definitionId":{"type":"string","description":"Custom field definition ID"}},"required":["definitionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_deal","description":"Soft-delete a CRM deal from the sales pipeline.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"dealId":{"type":"string","description":"The deal ID to delete"}},"required":["dealId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_invoice","description":"Delete a DRAFT invoice. Only invoices that have never been sent can be deleted; otherwise use void_invoice.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice ID to delete"}},"required":["invoiceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_knowledge_document","description":"Soft-delete a knowledge document. The agent loses access immediately, but the document can be restored with restore_knowledge_document.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Knowledge document ID"}},"required":["documentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_post","description":"Delete a CMS post by ID. Soft-deleted posts can be restored with restore_post.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"}},"required":["postId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_post_type","description":"Delete a custom post type. Built-in types cannot be deleted. Fails if any posts of this type still exist — delete those first.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"}},"required":["postTypeId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_post_type_field","description":"Remove a field from a post type schema. Blocked when posts of this type still have data in the field unless force=true is passed (orphans the data).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"},"fieldId":{"type":"string","description":"Field ID"},"force":{"description":"Delete even if posts have data in this field. Existing meta values become orphaned.","type":"boolean"}},"required":["postTypeId","fieldId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_promotion","description":"Delete a promotion. Past usage records are preserved.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"promotionId":{"type":"string","description":"Promotion ID"}},"required":["promotionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_segment","description":"Delete a customer segment.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"segmentId":{"type":"string","description":"The segment ID to delete"}},"required":["segmentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_service_package","description":"Delete a service package by ID.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"packageId":{"type":"string","description":"Service package ID to delete"}},"required":["packageId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_tag","description":"Delete a CRM tag and remove it from all tagged entities.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"tagId":{"type":"string","description":"The tag ID to delete"}},"required":["tagId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"delete_task","description":"Soft-delete a CRM task.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"taskId":{"type":"string","description":"The task ID to delete"}},"required":["taskId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"detach_tags","description":"Detach one tag from one or more member/account records.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountIds":{"type":"array","items":{"type":"string"},"description":"Member/account IDs to untag (max 100)"},"tagId":{"type":"string","description":"Tag ID to detach"}},"required":["accountIds","tagId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"earn_loyalty_points","description":"Credit loyalty points or stamps to a member. Use field=\"points\" for points, \"stamps\" for stamps. Server records a transaction with the reason as audit context.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The member/account ID"},"field":{"type":"string","enum":["points","stamps"],"description":"Which loyalty unit to credit"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"Positive integer amount to credit"},"reason":{"description":"Audit-trail reason (e.g. \"Booking completed\", \"Manual adjustment\")","type":"string"}},"required":["accountId","field","amount"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"enrol_membership","description":"Enrol a member into a membership tier. Free tiers enrol immediately; paid tiers return PAYMENT_REQUIRED unless skipPriceCheck is set. Use list_tiers first to find the target tier.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The member/account ID to enrol"},"tierId":{"description":"The membership tier ID. Omit to enrol on the default no-tier membership.","type":"string"},"expiresAt":{"description":"Optional ISO date to override the tier-computed expiry.","type":"string"}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"execute_tool","description":"Execute an available FavCRM tool by name after discovering it with search_tools. Target tool availability, input schema, module gates, and audit logging are still enforced.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"toolName":{"type":"string","minLength":1,"description":"Exact target tool name returned by search_tools"},"arguments":{"description":"Arguments object for the target tool. Must match the target input schema.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["toolName"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"find_or_create_workroom_thread","description":"Find or create a Workroom DM thread between a merchant user and an AI colleague. Use this when an inbound event deserves owner attention but no threadId was provided. This only prepares an internal Workroom channel.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"agentId":{"type":"string","description":"AI colleague ID for the Workroom DM"},"userId":{"description":"Merchant user ID to notify. Defaults to the current MCP user when omitted.","type":"string"},"title":{"description":"Optional title if a new thread is created","type":"string","maxLength":120}},"required":["agentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"generate_image","description":"Generate an AI image via kie.ai and return its public R2 URL. Use to mint reusable URLs for content blocks (image, gallery), product photos, or any field that takes an image URL — does NOT attach to a post by itself. Costs credits (see list_image_models). On poll timeout the job continues running; pass `jobId` from the response to merchant ai-media APIs to retrieve it later.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"Generation prompt"},"modelCode":{"type":"string","description":"Image model code from list_image_models"},"aspectRatio":{"description":"Output aspect ratio (e.g. 16:9, 1:1)","type":"string","maxLength":20},"negativePrompt":{"description":"Things to exclude from generation","type":"string","maxLength":2000},"seed":{"description":"Random seed for reproducible output","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pollTimeoutMs":{"description":"Default 60000.","type":"integer","minimum":5000,"maximum":120000},"pollIntervalMs":{"description":"Default 3000.","type":"integer","minimum":1000,"maximum":15000}},"required":["prompt","modelCode"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"generate_post_cover","description":"Generate an AI image and attach it as a post's featuredImage. Submits a kie.ai job, polls until complete, copies the result into the canonical post-asset R2 folder, and writes the public URL onto the post. Costs credits (see list_image_models). On poll timeout, the job continues — call attach_post_cover_from_job(postId, jobId) once it finishes to attach without paying again.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"Image generation prompt"},"modelCode":{"type":"string","description":"Image model code from list_image_models (e.g. nano-banana-2)"},"aspectRatio":{"description":"Aspect ratio passed to the model, e.g. \"16:9\", \"1:1\"","type":"string","maxLength":20},"negativePrompt":{"description":"Things to exclude from generation","type":"string","maxLength":2000},"seed":{"description":"Random seed for reproducible output","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pollTimeoutMs":{"description":"Default 60000.","type":"integer","minimum":5000,"maximum":120000},"pollIntervalMs":{"description":"Default 3000.","type":"integer","minimum":1000,"maximum":15000}},"required":["postId","prompt","modelCode"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_attachment_text","description":"Read the text/Markdown content of a file attached to a Workroom thread or sent by a customer (PDF, image, or document). Extracts on first read and caches the result. Returns status \"ready\" with markdown, or \"skipped\"/\"failed\"/\"not_found\" with a reason. Use when a message references an attachment you need to read.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"attachmentId":{"type":"string","description":"The attachment ID from the message attachments list"}},"required":["attachmentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_audit_log","description":"Fetch a single audit log entry by ID, including before/after snapshots when available.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"auditLogId":{"type":"string","description":"Audit log ID"}},"required":["auditLogId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_available_slots","description":"Find available booking slots for a service on a specific date.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"The service to check availability for"},"date":{"type":"string","description":"ISO date to check (YYYY-MM-DD)"},"staffId":{"description":"Optional: filter by specific staff member","type":"string"},"resourceId":{"description":"Optional: filter by specific resource","type":"string"}},"required":["serviceId","date"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_booking_detail","description":"Get full booking details including line items, status history, and participants.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"bookingId":{"type":"string","description":"The booking ID"}},"required":["bookingId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_booking_settings","description":"Get global booking settings for the customer booking flow, cancellation rules, visibility options, and confirmation requirements.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_booking_stats","description":"Get booking counts: today, this week, this month, and breakdown by status.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_campaign","description":"Get a campaign by ID, including its recipient source, audience exclusions, channel configuration, and delivery stats.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID"}},"required":["campaignId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_contact","description":"Fetch a single contact by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"contactId":{"type":"string","description":"The contact ID"}},"required":["contactId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_conversation_messages","description":"Get messages from a specific conversation thread. Shows the chat history between the merchant and a contact.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"conversationId":{"type":"string","description":"The conversation ID"},"search":{"description":"Search within messages","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"required":["conversationId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_custom_field","description":"Get a custom field definition by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"definitionId":{"type":"string","description":"Custom field definition ID"}},"required":["definitionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_custom_field_values","description":"Get custom field values for a CRM entity such as an account, contact, deal, or booking.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","booking","ticket","product","post"],"description":"Entity type"},"entityId":{"type":"string","description":"Entity ID"}},"required":["entityType","entityId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_dashboard_stats","description":"Get high-level business KPIs: member count, new members this week, active subscriptions, total points issued, active promotions, rewards redeemed, messages sent.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_deal","description":"Get detailed CRM deal information by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"dealId":{"type":"string","description":"The deal ID"}},"required":["dealId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_event_campaign_exclusions","description":"Resolve pending, confirmed, and paid event registrations into unique CRM account IDs for campaign exclusions. Pass accountIds to audienceExclusions only when ready=true; cancelled registrations are omitted and unmatched guests make the result not ready.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Event ID"}},"required":["eventId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_invoice","description":"Fetch a single invoice with line items, payment history, and customer detail.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice ID"}},"required":["invoiceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_invoice_stats","description":"Outstanding totals, overdue counts, and revenue this period. Used by the weekly-snapshot playbook.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_knowledge_document","description":"Fetch a single knowledge document with metadata + extraction/review status. Reviewed content is served via GET /v6/merchant/ai/knowledge/{id}/content; raw/extracted variants are for audit.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Knowledge document ID"}},"required":["documentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_loyalty_balance","description":"Get a member's current loyalty balance — points, stamps, credits, lifetime totals, and active membership tier. Returns null if the member is not enrolled.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The member/account ID"}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_member_profile","description":"Get detailed profile for a specific member/account by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The account ID"}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_membership_tier","description":"Get a specific membership tier by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"tierId":{"type":"string","description":"The tier ID"}},"required":["tierId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_offer_rule","description":"Get offer rule detail including associated products and discounts.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"ruleId":{"type":"string","description":"The offer rule ID"}},"required":["ruleId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_order","description":"Get full order detail including line items.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"orderId":{"type":"string","description":"The order UUID"}},"required":["orderId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_plan_status","description":"Show the current organisation plan, subscription/payment state, enabled modules, and quota usage. Use before deciding whether an agentic operation is allowed.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_post","description":"Get detailed CMS post including content blocks, categories, and tags.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"}},"required":["postId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_product","description":"Get full product detail including images, options, and variations.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"productId":{"type":"number","description":"The product ID"}},"required":["productId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_promotion","description":"Get details of a specific promotion/coupon code.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"promotionId":{"type":"string","description":"The promotion ID"}},"required":["promotionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_segment","description":"Get customer segment details including type, criteria, and live member count.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"segmentId":{"type":"string","description":"The segment ID"}},"required":["segmentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_segment_members","description":"Get the members that belong to a specific segment.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"segmentId":{"type":"string","description":"The segment ID"},"limit":{"description":"Max results (default 20)","type":"number"}},"required":["segmentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_service_detail","description":"Get full service details including addons, staff, resources, and tier pricing.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"The service ID"}},"required":["serviceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_service_package","description":"Get service package detail including applicability and selected booking service/event items.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"packageId":{"type":"string","description":"Service package ID"}},"required":["packageId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_service_tier_pricing","description":"Read every membership-tier pricing configuration for one booking service.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Booking service ID"}},"required":["serviceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_subscription","description":"Fetch a single subscription with customer, tier, billing cycle, and renewal info.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Subscription ID"}},"required":["subscriptionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_survey","description":"Get survey detail, including blocks, publishing status, visibility, settings, and response count.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_survey_responses","description":"List responses for a survey.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"},"limit":{"description":"Max responses (default 50)","type":"number"}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_survey_stats","description":"Get response and invitation metrics for a survey overview dashboard.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_task","description":"Get detailed task information by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"taskId":{"type":"string","description":"The task ID"}},"required":["taskId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_ticket_stats","description":"Get ticket counts grouped by status.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"get_whatsapp_connection_status","description":"Check whether WhatsApp Business is connected for this company, including WABA/phone metadata and the latest agentic connect session state.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"issue_rewards","description":"Issue a gift/reward to multiple members. Requires a gift offer ID and member IDs.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"giftOfferId":{"type":"string","description":"The gift offer/reward scheme ID to issue"},"memberIds":{"type":"array","items":{"type":"string"},"description":"Member/account IDs to receive the reward (max 50)"},"expiresAt":{"description":"Optional ISO date when the reward expires","type":"string"}},"required":["giftOfferId","memberIds"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"link_resource_to_service","description":"Link a room/resource to a booking service.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"Service ID"},"resourceId":{"type":"string","description":"Resource ID"}},"required":["serviceId","resourceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_audit_logs","description":"List recent audit log entries for this company. Filter by action, resource, resourceId, user, source, outcome, destructive flag, and created date range.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"limit":{"default":50,"description":"Maximum rows to return","type":"integer","minimum":1,"maximum":200},"action":{"description":"Exact tool/action name, e.g. delete_campaign","type":"string"},"resource":{"description":"Resource name, e.g. campaigns","type":"string"},"resourceId":{"description":"Resource ID","type":"string"},"userId":{"description":"Actor user ID","type":"string"},"source":{"description":"Audit source, e.g. mcp, ai_agent, payment_webhook, merchant_api","type":"string","enum":["mcp","ai_agent","merchant_api","payment_webhook","manual_refresh","qfpay_reconciliation","hold_expiry_sweeper"]},"outcome":{"description":"Execution outcome","type":"string","enum":["success","failed","blocked"]},"destructive":{"description":"Whether the audited tool was destructive","type":"boolean"},"createdAfter":{"description":"ISO timestamp lower bound","type":"string"},"createdBefore":{"description":"ISO timestamp upper bound","type":"string"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_bookings","description":"List bookings with filters for date range, status, service, staff, or member.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by booking status","type":"string","enum":["draft","held","pending","confirmed","cancelled","completed","no_show"]},"serviceId":{"description":"Filter by service ID","type":"string"},"staffId":{"description":"Filter by staff member ID","type":"string"},"accountId":{"description":"Filter by member/account ID","type":"string"},"dateFrom":{"description":"ISO date — bookings from this date","type":"string"},"dateTo":{"description":"ISO date — bookings up to this date","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_campaigns","description":"List marketing campaigns (email, SMS, WhatsApp, or push) with delivery stats. Use the returned IDs when excluding recipients of previous campaigns.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"channel":{"description":"Filter by channel","type":"string","enum":["sms","email","whatsapp","push"]},"search":{"description":"Search by campaign name","type":"string"},"sort":{"description":"Sort column","type":"string"},"order":{"description":"Sort order","type":"string","enum":["asc","desc"]},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_categories","description":"List CMS post categories.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_contacts","description":"List contacts (people linked to CRM accounts), optionally filtered by account or search.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"description":"Filter by account","type":"string"},"search":{"description":"Match name, email, or phone","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_conversations","description":"List messaging conversations across WhatsApp, Messenger, Instagram, Threads, SMS, email, and other enabled channels. Threads items are public conversations. Shows unread counts and last message time.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"channel":{"description":"Filter by channel","type":"string","enum":["whatsapp","sms","email","messenger","instagram","threads","web_form"]},"status":{"description":"Filter by conversation status","type":"string","enum":["active","archived","closed"]},"search":{"description":"Search by contact name, phone, or email","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_custom_fields","description":"List custom field definitions for CRM entities such as account, contact, deal, or booking.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","booking","ticket","product","post"],"description":"Entity type the custom fields belong to"}},"required":["entityType"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_deals","description":"List CRM deals (sales pipeline) with optional filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"page":{"description":"Page number (default 1)","type":"number"},"limit":{"description":"Items per page (default 20)","type":"number"},"search":{"description":"Search by name or description","type":"string"},"accountId":{"description":"Filter by account","type":"string"},"stage":{"description":"Filter by stage","type":"string"},"dealType":{"description":"Filter by deal type","type":"string"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_event_registrations","description":"List registrations for an event in the active company, including CRM account IDs for campaign exclusions.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Event ID"},"statuses":{"description":"Registration statuses to include. Omit to include all statuses.","minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["pending","confirmed","paid","cancelled"]}},"limit":{"description":"Max results (default 50, maximum 100)","type":"integer","minimum":1,"maximum":100},"offset":{"description":"Number of matching registrations to skip (default 0)","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["eventId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_image_models","description":"List AI image-generation models exposed to merchants (sanitized — provider/cost details hidden). Use to pick a `modelCode` for `generate_post_cover`.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_invoices","description":"List invoices with optional filters. Use status \"OVERDUE\" to find unpaid invoices past due date.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by invoice status","type":"string","enum":["DRAFT","SENT","PARTIALLY_PAID","PAID","OVERDUE","VOID","CANCELLED"]},"search":{"description":"Search by invoice number, account name, email, or phone","type":"string"},"sort":{"description":"Sort column","type":"string"},"order":{"description":"Sort order","type":"string","enum":["asc","desc"]},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_knowledge_documents","description":"List merchant knowledge base documents (uploads + scraped URLs). Use reviewStatus/syncable to see what is ready for agent retrieval. Pass `updatedAfter` for delta sync. Reviewed content is fetched via GET /v6/merchant/ai/knowledge/{id}/content; source audit text is available with ?variant=extracted.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"updatedAfter":{"description":"ISO timestamp — only return docs updated after this. Use for delta sync.","type":"string"},"limit":{"description":"Max results (default 100)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_my_companies","description":"List all companies/organisations the current user has access to. Use this to see available orgs before switching.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_notes","description":"List notes attached to a member/account, booking, or ticket.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","booking","ticket","invoice"],"description":"Type of entity the notes are on"},"entityId":{"type":"string","description":"The entity ID"},"limit":{"description":"Max results (default 10)","type":"number"}},"required":["entityType","entityId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_notification_logs","description":"List notification delivery logs for the current company. Recipients are masked by default for incident-response safety.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"channel":{"description":"Notification channel filter","type":"string","enum":["email","sms","whatsapp","push"]},"eventType":{"description":"Event type filter","type":"string","enum":["account_created","account_updated","booking_created","booking_confirmed","booking_checked_in","booking_cancelled","booking_completed","booking_reminder","order_placed","order_completed","order_cancelled","order_refunded","payment_received","payment_failed","payment_failed_followup","membership_enrolled","membership_expired","membership_expired_followup","tier_changed","deal_stage_changed","deal_won","deal_lost","customer_ownership_review_required","customer_ownership_review_resolved","event_registered","event_cancelled","event_updated","event_checkout_abandoned","event_session_reminder","tutor_course_enrollment_confirmed","tutor_course_payment_pending","tutor_course_leave_requested","tutor_course_leave_approved","tutor_course_leave_declined","tutor_course_class_switch_requested","tutor_course_class_switch_approved","tutor_course_class_switch_declined","staff_agenda_digest","invoice_created","invoice_sent","invoice_paid","invoice_reminder","invoice_overdue","invoice_voided","invoice_installment_reminder","invoice_installment_overdue","invoice_due_in_n_days","subscription_created","subscription_activated","subscription_paused","subscription_cancellation_scheduled","subscription_cancelled","subscription_expired","subscription_renewed","subscription_payment_failed","subscription_renewal_reminder","campaign_sent","campaign_failed","promotion_activated","promotion_expired","coupon_redeemed","gift_offer_claimed","gift_offer_redeemed","gift_offer_expired","service_package_purchased","service_package_redeemed","service_package_expired","service_package_expiring_soon","service_package_low_quota","service_package_expired_followup","reward_earned","reward_redeemed","reward_expired","reward_redemption_expiring_soon","reward_unused_after_n_days","loyalty_points_added","loyalty_points_used","loyalty_stamps_added","loyalty_stamps_used","member_credit_added","member_credit_used","membership_expiring_soon","booking_followup_review_request","customer_inactive_n_days","ticket_created","ticket_resolved","ticket_closed","integration_order_created","integration_order_fulfilled","integration_shipment_in_transit","integration_shipment_out_for_delivery","integration_shipment_delivered","integration_shipment_delayed","integration_shipment_attempted_delivery","integration_shipment_ready_for_pickup","integration_shipment_exception","integration_order_cancelled","integration_cart_abandoned","integration_customer_created","integration_product_out_of_stock","post_published","post_updated","post_unpublished","survey_invitation_sent","survey_invitation_opened","survey_response_submitted","survey_completed","survey_score_matched","wallet_pass_generated","agent_action.proposed","agent_action.approved","agent_action.rejected","agent_action.executed","agent_action.failed","team_member_application_review_required","custom_field_changed","otp_sent","review_request"]},"status":{"description":"Status filter","type":"string","enum":["pending","retrying","sent","delivered","failed","skipped"]},"recipient":{"description":"Substring search on recipient","type":"string"},"entityId":{"description":"Entity ID filter","type":"string"},"dateFrom":{"description":"ISO timestamp lower bound","type":"string"},"dateTo":{"description":"ISO timestamp upper bound","type":"string"},"limit":{"description":"Max results (default 50, max 100)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_offer_rules","description":"List upsell/cross-sell offer rules with optional filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by status","type":"string","enum":["draft","active","paused"]},"type":{"description":"Filter by rule type","type":"string","enum":["upsell","cross_sell","bundle","post_purchase"]},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_orders","description":"List shop orders with optional status and search filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by order status","type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled","refunded"]},"search":{"description":"Search by order number or customer name/email","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_outlets","description":"List shop outlets/locations for the company.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"activeOnly":{"description":"When true, only return active outlets (default false)","type":"boolean"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_plan_options","description":"List active FavCRM plans with prices, quotas, included modules, and whether each is the current plan.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_post_type_fields","description":"List the custom field schema for a post type. Use this before creating posts to know which keys to pass in meta and what types they expect.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID (from list_post_types)"}},"required":["postTypeId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_post_types","description":"List all post types defined for this company (built-in: blog_post, page; plus any custom types).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_posts","description":"List CMS posts (blog posts and/or pages) with optional filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"type":{"description":"Filter by post type slug (blog_post, page, or any custom type — see list_post_types).","type":"string"},"status":{"description":"Filter by status","type":"string","enum":["draft","scheduled","published","archived"]},"search":{"description":"Search by title","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_product_categories","description":"List all product categories for the shop.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_products","description":"List shop products with optional filters by name, status, or category.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"search":{"description":"Search by product name","type":"string"},"status":{"description":"Filter by status","type":"string","enum":["DRAFT","ACTIVE","ARCHIVED"]},"categoryId":{"description":"Filter by category ID","type":"number"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_promotions","description":"List promotion/coupon codes with optional status filter.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by status","type":"string","enum":["DRAFT","ACTIVE","PAUSED","EXPIRED"]},"search":{"description":"Search by name","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_resources","description":"List booking resources (rooms, equipment, etc.).","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_reward_schemes","description":"List loyalty reward schemes (points/stamps programs) configured for this business.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"search":{"description":"Search by name","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_segments","description":"List customer segments. Segments group members by criteria for targeted campaigns.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"search":{"description":"Search by segment name","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_service_categories","description":"List service categories (groups for booking services like \"Treatments\", \"Classes\").","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_service_packages","description":"List service packages/prepaid session bundles with optional search, status, sorting, and pagination.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"search":{"description":"Search package name","type":"string"},"status":{"description":"Filter by package status","type":"string","enum":["ACTIVE","INACTIVE"]},"sort":{"description":"Sort column: name, price, or createdAt","type":"string"},"order":{"description":"Sort order","type":"string","enum":["asc","desc"]},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_service_schedules","description":"List schedule windows for booking services.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"description":"Service ID","type":"string"},"staffId":{"description":"Staff member ID","type":"string"},"resourceId":{"description":"Resource ID (room/equipment)","type":"string"},"dateFrom":{"description":"YYYY-MM-DD","type":"string"},"dateTo":{"description":"YYYY-MM-DD","type":"string"},"isOverride":{"description":"Filter to override entries only","type":"boolean"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_services","description":"List booking services with name, price, duration, and status.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by status","type":"string","enum":["active","inactive","archived"]},"search":{"description":"Search by name","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_shipping_methods","description":"List all shipping methods configured for the shop.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_staff","description":"List staff/team members in the business.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_subscriptions","description":"List member subscriptions. Filter by status to find active, cancelled, or past-due subscriptions.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by subscription status","type":"string","enum":["trialing","active","past_due","cancelled"]},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_survey_invitations","description":"List survey invitation history without exposing token hashes or old invitation tokens.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"},"limit":{"description":"Max invitations (default 50)","type":"number"}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_survey_workflows","description":"List automation workflows attached to a survey.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_surveys","description":"List surveys with optional status/search filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by survey status","type":"string","enum":["draft","published","closed","archived"]},"search":{"description":"Search survey title or description","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_tags","description":"List all available tags for the merchant.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"search":{"description":"Search tags by name","type":"string"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_tasks","description":"List tasks with optional status, assignee, and account filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by task status","type":"string","enum":["todo","in_progress","blocked","done"]},"assigneeId":{"description":"Filter by assignee company_members.id","type":"string"},"accountId":{"description":"Filter by related CRM account","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_templates","description":"List the company's WhatsApp message templates with their Meta approval status (PENDING / APPROVED / REJECTED). Check this to see which templates are approved before referencing one in a campaign.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"limit":{"description":"Max templates to return (default 20)","type":"integer","minimum":1,"maximum":100}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_tickets","description":"List support tickets with optional filters.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"status":{"description":"Filter by status","type":"string","enum":["open","in_progress","waiting_customer","resolved","closed"]},"priority":{"description":"Filter by priority","type":"string","enum":["critical","high","medium","low"]},"category":{"description":"Filter by category","type":"string","enum":["bug","feature_request","account","billing","general","other"]},"accountId":{"description":"Filter by CRM account ID","type":"string"},"search":{"description":"Search by subject","type":"string"},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"list_tiers","description":"List all membership tiers with member counts and stats.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"mark_deal_lost","description":"Mark a CRM deal as lost. Requires a lost reason.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"dealId":{"type":"string","description":"The deal ID"},"reason":{"type":"string","description":"Why the deal was lost"}},"required":["dealId","reason"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"mark_deal_won","description":"Mark a CRM deal as won and set close date.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"dealId":{"type":"string","description":"The deal ID"},"closingDate":{"description":"Optional close date (YYYY-MM-DD)","type":"string"}},"required":["dealId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"mark_invoice_sent","description":"Mark an invoice as sent to the customer (transitions DRAFT → OPEN). Use after delivering the invoice via email or share link. Idempotent.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice ID"}},"required":["invoiceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"mark_no_show","description":"Mark a booking as no-show when the customer did not attend.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"bookingId":{"type":"string","description":"The booking ID to mark as no-show"}},"required":["bookingId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"pause_subscription","description":"Pause an active subscription (status → past_due, no further auto-renew). Use resume_subscription to reactivate.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Subscription ID"}},"required":["subscriptionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"post_workroom_message","description":"Post an internal message from an AI colleague into a Workroom thread. Use this to report findings, ask the owner for approval, or share source links after reading CRM/Inbox data. This does not send anything to customers.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"threadId":{"type":"string","description":"Workroom thread ID"},"agentId":{"type":"string","description":"AI colleague ID that is a participant in the thread"},"content":{"type":"string","minLength":1,"maxLength":8000,"description":"Message to show in Workroom. Markdown is allowed."},"metadata":{"description":"Optional generic metadata, e.g. {sourceRefs:[{type:\"inbox_conversation\",id:\"...\"}]}","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["threadId","agentId","content"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"preview_customer_import","description":"Preview a bulk customer import (max 2000 rows). Matches existing accounts by phone/email and shows create vs update actions plus points/stamps/credit deltas. Use commit_customer_import with the returned sessionId to apply.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"filename":{"description":"Original filename for audit","type":"string","maxLength":255},"rows":{"minItems":1,"maxItems":2000,"type":"array","items":{"type":"object","properties":{"rowNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"1-based row number from the source file (for error reporting)"},"name":{"description":"Display name","anyOf":[{"type":"string"},{"type":"null"}]},"firstName":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"membershipTier":{"description":"Tier name or ID","anyOf":[{"type":"string"},{"type":"null"}]},"points":{"description":"Target loyalty points (分數)","anyOf":[{"type":"number"},{"type":"null"}]},"stamps":{"anyOf":[{"type":"number"},{"type":"null"}]},"credit":{"description":"Target wallet stored value / 儲值 (HKD)","anyOf":[{"type":"number"},{"type":"null"}]},"expiryDate":{"description":"Membership expiry YYYY-MM-DD","anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"description":"Internal notes","anyOf":[{"type":"string"},{"type":"null"}]},"memberCode":{"description":"Merchant member code (e.g. LIZLAB-00144)","anyOf":[{"type":"string"},{"type":"null"}]},"referredBy":{"description":"Referrer account UUID, member code, phone, or email","anyOf":[{"type":"string"},{"type":"null"}]},"lifeStage":{"anyOf":[{"type":"string","enum":["lead","active","churned","vip"]},{"type":"null"}]},"source":{"anyOf":[{"type":"string","enum":["walk_in","online","pos","whatsapp","referral","import","api","shopify","woocommerce","email"]},{"type":"null"}]},"type":{"anyOf":[{"type":"string","enum":["individual","business","household"]},{"type":"null"}]},"gender":{"anyOf":[{"type":"string"},{"type":"null"}]},"dateOfBirth":{"description":"YYYY-MM-DD","anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"description":"Comma-separated tag names","anyOf":[{"type":"string"},{"type":"null"}]},"customFields":{"description":"Account custom fields keyed by fieldName","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"type":"null"}]}},"required":["rowNumber"]}}},"required":["rows"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"preview_segment_count","description":"Preview how many customers would match dynamic segment criteria before creating or updating a segment.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"criteria":{"description":"Dynamic criteria to preview. Omit or null to count all active customers.","anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"],"description":"How to combine conditions"},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"},"operator":{"type":"string","description":"Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"},"threshold":{"description":"Numeric threshold for numeric conditions","type":"number"},"days":{"description":"Days window for time-based conditions","type":"number"},"value":{"description":"Single value for text/date/selection/custom-field conditions","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"values":{"description":"Multiple values for IN/NOT_IN conditions","type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"definitionId":{"description":"Custom field definition ID for custom-field segment conditions","type":"string"},"fieldName":{"description":"Custom field name for custom-field segment conditions","type":"string"},"fieldType":{"description":"Custom field type for custom-field segment conditions","type":"string"}},"required":["type","operator"]},"description":"Filter conditions"}},"required":["operator","conditions"]},{"type":"null"}]}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"query_company_knowledge","description":"Search this company's reviewed knowledge base and return grounded snippets with source document IDs. Use for merchant policies, FAQs, pricing notes, brand guidance, and other uploaded references.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Question or keywords to search for in company knowledge"},"limit":{"description":"Maximum matching snippets (default 5)","type":"integer","minimum":1,"maximum":20},"maxSnippetChars":{"description":"Maximum characters per snippet (default 600)","type":"integer","minimum":120,"maximum":1200}},"required":["query"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"query_favcrm_platform","description":"Search FavCRM MCP tools, enabled skills, and feature areas for how to use the platform. Use before guessing tool names or JSON arguments.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Plain-language capability question, e.g. \"create a booking\" or \"send a campaign safely\""},"area":{"description":"Restrict search area (default all)","type":"string","enum":["all","tools","skills","features"]},"limit":{"description":"Maximum results (default 8)","type":"integer","minimum":1,"maximum":20}},"required":["query"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"record_invoice_payment","description":"Record a manual payment against an invoice (cash, bank transfer, cheque, card terminal). Updates invoice status to PARTIAL or PAID based on the running total.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice ID to record payment against"},"amount":{"type":"string","description":"Payment amount as decimal string, e.g. \"100.00\""},"method":{"type":"string","enum":["cash","bank_transfer","cheque","card","stripe","qfpay","eftpay","yedpay","manual","member_credit","other"],"description":"Payment method"},"reference":{"description":"External reference (cheque number, bank transfer ID)","type":"string"},"note":{"description":"Internal note about this payment","type":"string"}},"required":["invoiceId","amount","method"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"register_organisation_request","description":"Step 1 of agentic signup. Sends a 6-digit verification code to the email. After the user reads the code, call register_organisation_verify with it to finish and receive an API key. Use this when a user wants to create a new FavCRM workspace from inside an MCP client.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"organisationName":{"type":"string","minLength":2,"maxLength":80,"description":"Business / brand name (used as the first company name too)"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Owner email — receives a 6-digit code (10 min TTL)"},"industry":{"description":"Vertical — drives default templates","type":"string","enum":["beauty","fitness","tutoring","retail","hospitality","services","other"]},"country":{"description":"ISO 3166-1 alpha-2 country code (HK, US, GB, ...)","type":"string","minLength":2,"maxLength":2},"timezone":{"description":"IANA timezone (e.g. Asia/Hong_Kong); falls back to country default","type":"string"}},"required":["organisationName","email"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"register_organisation_verify","description":"Step 2 of agentic signup. Confirms the 6-digit code and creates the workspace. Returns an API key the agent should set as Authorization: Bearer <apiKey> for all subsequent FavCRM MCP calls in this session.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"requestId":{"type":"string","description":"From register_organisation_request"},"code":{"type":"string","minLength":6,"maxLength":6,"description":"6-digit code from the verification email"}},"required":["requestId","code"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"remove_post_block","description":"Remove the block at the given index (0-based). All subsequent blocks shift up by one.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"0-based index of the block to remove"}},"required":["postId","index"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"reorder_post_blocks","description":"Reorder blocks by passing block IDs in the desired order. The id list must contain every existing block id exactly once.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"orderedBlockIds":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Block IDs in the desired order; must match the existing set exactly"}},"required":["postId","orderedBlockIds"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"reorder_post_type_fields","description":"Reorder fields on a post type. Pass field IDs in the desired display order; sortOrder is updated to match.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"},"orderedFieldIds":{"type":"array","items":{"type":"string"},"description":"Field IDs in the desired order"}},"required":["postTypeId","orderedFieldIds"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"replace_post_block","description":"Replace a single block at the given index (0-based). Avoids fetching the full post and re-sending all blocks via update_post.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"0-based index of the block to replace"},"block":{"description":"Replacement block","oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"paragraph"},"data":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"heading"},"data":{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"text":{"type":"string","minLength":1},"anchor":{"type":"string"}},"required":["level","text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"image"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["url","alt"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"list"},"data":{"type":"object","properties":{"ordered":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ordered","items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"quote"},"data":{"type":"object","properties":{"text":{"type":"string","minLength":1},"cite":{"type":"string"}},"required":["text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"code"},"data":{"type":"object","properties":{"lang":{"type":"string"},"code":{"type":"string","minLength":1}},"required":["lang","code"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"divider"},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"spacer"},"data":{"type":"object","properties":{"size":{"type":"string","enum":["sm","md","lg"]}},"required":["size"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"embed"},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["youtube","vimeo","iframe"]},"url":{"type":"string","format":"uri"},"aspectRatio":{"type":"string"}},"required":["provider","url"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"html"},"data":{"type":"object","properties":{"html":{"type":"string","minLength":1}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"youtube"},"data":{"type":"object","properties":{"videoId":{"type":"string","pattern":"^[A-Za-z0-9_-]{11}$"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"startSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"aspectRatio":{"type":"string"}},"required":["videoId"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"file"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"originalName":{"type":"string","minLength":1},"displayName":{"type":"string"},"icon":{"type":"string","enum":["pdf","doc","image","video","audio","generic"]}},"required":["url","mimeType","sizeBytes","originalName"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"faq"},"data":{"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"question":{"type":"string","minLength":1},"answer":{"type":"string"}},"required":["id","question","answer"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"callout"},"data":{"type":"object","properties":{"tone":{"type":"string","enum":["info","success","warning","danger","note"]},"title":{"type":"string"},"body":{"type":"string","minLength":1}},"required":["tone","body"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"gallery"},"data":{"type":"object","properties":{"layout":{"type":"string","enum":["grid","masonry","carousel"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"}},"required":["url","alt"]}}},"required":["layout","images"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"cta"},"data":{"type":"object","properties":{"label":{"type":"string","minLength":1},"href":{"type":"string","minLength":1},"style":{"type":"string","enum":["primary","secondary","ghost"]},"openInNewTab":{"type":"boolean"}},"required":["label","href"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"accordion"},"data":{"type":"object","properties":{"semantic":{"type":"string","enum":["faq","plain"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"body":{"type":"string"}},"required":["id","title","body"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"product"},"data":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"layout":{"type":"string","enum":["card","inline"]}},"required":["slug"]}},"required":["id","version","type","data"]},{"$ref":"#/definitions/__schema0"}]}},"required":["postId","index","block"],"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"__schema0":{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"columns"},"data":{"type":"object","properties":{"columns":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"span":{"type":"number","exclusiveMinimum":0},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"paragraph"},"data":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"heading"},"data":{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"text":{"type":"string","minLength":1},"anchor":{"type":"string"}},"required":["level","text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"image"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["url","alt"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"list"},"data":{"type":"object","properties":{"ordered":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ordered","items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"quote"},"data":{"type":"object","properties":{"text":{"type":"string","minLength":1},"cite":{"type":"string"}},"required":["text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"code"},"data":{"type":"object","properties":{"lang":{"type":"string"},"code":{"type":"string","minLength":1}},"required":["lang","code"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"divider"},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"spacer"},"data":{"type":"object","properties":{"size":{"type":"string","enum":["sm","md","lg"]}},"required":["size"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"embed"},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["youtube","vimeo","iframe"]},"url":{"type":"string","format":"uri"},"aspectRatio":{"type":"string"}},"required":["provider","url"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"html"},"data":{"type":"object","properties":{"html":{"type":"string","minLength":1}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"youtube"},"data":{"type":"object","properties":{"videoId":{"type":"string","pattern":"^[A-Za-z0-9_-]{11}$"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"startSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"aspectRatio":{"type":"string"}},"required":["videoId"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"file"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"originalName":{"type":"string","minLength":1},"displayName":{"type":"string"},"icon":{"type":"string","enum":["pdf","doc","image","video","audio","generic"]}},"required":["url","mimeType","sizeBytes","originalName"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"faq"},"data":{"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"question":{"type":"string","minLength":1},"answer":{"type":"string"}},"required":["id","question","answer"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"callout"},"data":{"type":"object","properties":{"tone":{"type":"string","enum":["info","success","warning","danger","note"]},"title":{"type":"string"},"body":{"type":"string","minLength":1}},"required":["tone","body"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"gallery"},"data":{"type":"object","properties":{"layout":{"type":"string","enum":["grid","masonry","carousel"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"}},"required":["url","alt"]}}},"required":["layout","images"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"cta"},"data":{"type":"object","properties":{"label":{"type":"string","minLength":1},"href":{"type":"string","minLength":1},"style":{"type":"string","enum":["primary","secondary","ghost"]},"openInNewTab":{"type":"boolean"}},"required":["label","href"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"accordion"},"data":{"type":"object","properties":{"semantic":{"type":"string","enum":["faq","plain"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"body":{"type":"string"}},"required":["id","title","body"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"product"},"data":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"layout":{"type":"string","enum":["card","inline"]}},"required":["slug"]}},"required":["id","version","type","data"]},{"$ref":"#/definitions/__schema0"}]}}},"required":["blocks"]}},"stackBelow":{"type":"string","pattern":"^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"},"align":{"type":"string","enum":["start","center","stretch"]}},"required":["columns"]}},"required":["id","version","type","data"]}}}},{"name":"report_agent_issue","description":"Report a FavCRM platform issue when an agent finds a missing MCP path, tool failure, confusing schema, CLI/docs issue, or SDK fallback. Include logs, AI analysis, references, and clarification questions so the platform team can follow up.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":180,"description":"Short issue title"},"severity":{"type":"string","enum":["critical","high","medium","low"],"description":"Impact level"},"area":{"type":"string","enum":["mcp_tool_missing","mcp_tool_error","mcp_schema_confusing","auth","cli","docs","sdk_fallback","other"],"description":"Issue area"},"expectedBehavior":{"type":"string","minLength":1,"description":"What the agent or user expected to happen"},"actualBehavior":{"type":"string","minLength":1,"description":"What actually happened"},"stepsTried":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Concrete steps the agent tried before reporting"},"toolCalls":{"description":"Relevant MCP/CLI/SDK calls, arguments, and outcomes","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"logs":{"description":"Relevant error messages, command output, or stack traces","type":"array","items":{"type":"string"}},"aiAnalysis":{"type":"string","minLength":1,"description":"Agent analysis of likely root cause and impact"},"clarificationQuestions":{"description":"Questions the platform team should ask the agent/user to resolve ambiguity","type":"array","items":{"type":"string"}},"references":{"description":"Source links, file paths, docs, screenshots, or IDs that support the report","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"environment":{"description":"Runtime context such as MCP URL, CLI version, token type, client, sandbox, model, OS","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"workaround":{"description":"Temporary workaround used, if any","type":"string"}},"required":["title","severity","area","expectedBehavior","actualBehavior","stepsTried","aiAnalysis"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"request_send_approval","description":"Create a merchant-owned Workroom approval request for a customer-facing send. The agent must not call send_message, send_whatsapp_message, send_test_campaign, or send_campaign directly.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"threadId":{"type":"string","description":"Workroom thread ID where the approval button should appear"},"agentId":{"type":"string","description":"AI colleague ID that is a participant in the thread"},"actionType":{"type":"string","enum":["send_message","send_whatsapp_message","send_test_campaign","send_campaign"],"description":"The customer-facing action to execute only after merchant approval"},"summary":{"type":"string","minLength":1,"maxLength":4000,"description":"Human-readable draft/recipient/campaign summary shown above the approval buttons"},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Exact tool payload to execute if the merchant approves. For send_test_campaign use { campaignId, to }, with an email address or international WhatsApp number matching the campaign channel."}},"required":["threadId","agentId","actionType","summary","payload"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_campaign","description":"Restore a previously deleted campaign.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID"}},"required":["campaignId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_category","description":"Restore a previously deleted CMS post category.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"categoryId":{"type":"string","description":"Category ID"}},"required":["categoryId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_invoice","description":"Restore a previously deleted DRAFT invoice.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice ID to restore"}},"required":["invoiceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_knowledge_document","description":"Restore a previously deleted knowledge document.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"documentId":{"type":"string","description":"Knowledge document ID"}},"required":["documentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_post","description":"Restore a previously deleted CMS post.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"}},"required":["postId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_post_type","description":"Restore a previously deleted custom post type.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"}},"required":["postTypeId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_post_type_field","description":"Restore a previously deleted field on a post type schema.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"},"fieldId":{"type":"string","description":"Field ID"}},"required":["postTypeId","fieldId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_promotion","description":"Restore a previously deleted promotion.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"promotionId":{"type":"string","description":"Promotion ID"}},"required":["promotionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"restore_service_package","description":"Restore a previously deleted service package by ID.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"packageId":{"type":"string","description":"Service package ID to restore"}},"required":["packageId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"resume_subscription","description":"Resume a paused subscription back to active.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"subscriptionId":{"type":"string","description":"Subscription ID"}},"required":["subscriptionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"revert_audit_action","description":"Revert an audited action by restoring the captured before snapshot. Only works for allowlisted target tables with full before/after audit snapshots.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"auditLogId":{"type":"string","description":"Audit log ID to revert"},"reason":{"description":"Reason for reverting this action","type":"string","maxLength":1000}},"required":["auditLogId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"scrape_knowledge_url","description":"Fetch a URL's content into the knowledge base. Server crawls the URL, stores the response body in R2, returns the new document ID. Failures store the row with status='failed'. Use for adding marketing pages, FAQ docs, or external references the agent should be aware of.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL to fetch (must be https / http and publicly reachable)"}},"required":["url"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"search_audit_logs","description":"Search audit logs by free text across action, resource, resource ID, changes JSON, and metadata JSON.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"description":"Text to search for"},"limit":{"default":25,"description":"Maximum rows to return","type":"integer","minimum":1,"maximum":100},"createdAfter":{"description":"ISO timestamp lower bound","type":"string"},"createdBefore":{"description":"ISO timestamp upper bound","type":"string"}},"required":["query"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"search_crm","description":"Search across CRM accounts and contacts by name, email, or phone.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"type":"string","description":"Search string"},"limit":{"description":"Max per entity (default 10)","type":"number"}},"required":["query"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"search_members","description":"Search and filter members/accounts. Supports text search, date ranges, booking/activity history, membership tier, tags, and more. Use lastBookingBefore/inactiveDays to find inactive members.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"search":{"description":"Name, email, or phone to search","type":"string"},"lifeStage":{"description":"Filter by life stage","type":"string","enum":["lead","active","churned","vip"]},"hasMembership":{"description":"Filter to members with active membership","type":"boolean"},"createdAfter":{"description":"ISO date — accounts created after this date","type":"string"},"createdBefore":{"description":"ISO date — accounts created before this date","type":"string"},"lastBookingBefore":{"description":"ISO date — members whose last booking is before this date (or have no bookings)","type":"string"},"lastBookingAfter":{"description":"ISO date — members who have a booking after this date","type":"string"},"hasBooking":{"description":"Filter to members with/without any booking","type":"boolean"},"lastActivityBefore":{"description":"ISO date — members with no activity since this date","type":"string"},"lastActivityAfter":{"description":"ISO date — members with activity after this date","type":"string"},"inactiveDays":{"description":"Members with no activity in the last N days","type":"number"},"tierId":{"description":"Filter by membership tier ID","type":"string"},"membershipStatus":{"description":"Filter by membership status","type":"string","enum":["active","expired","suspended"]},"source":{"description":"Filter by account source","type":"string","enum":["walk_in","online","pos","whatsapp","referral","import","api","shopify","woocommerce","email"]},"tagIds":{"description":"Filter by tag IDs","type":"array","items":{"type":"string"}},"sort":{"description":"Sort column: name, email, or createdAt","type":"string"},"order":{"description":"Sort order","type":"string","enum":["asc","desc"]},"limit":{"description":"Max results (default 20)","type":"number"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"search_tools","description":"Search the available FavCRM tool catalog for relevant operations. Use this when the curated direct tool list does not contain the operation you need.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"query":{"description":"Plain-language tool search, e.g. \"delete a segment\" or \"set custom field values\"","type":"string","minLength":1},"scope":{"description":"Optional exact scope filter, e.g. contacts, customer_segments, invoices","type":"string"},"write":{"description":"Filter to write tools (true) or read-only tools (false)","type":"boolean"},"limit":{"description":"Maximum results (default 8, max 20)","type":"integer","minimum":1,"maximum":20},"includeInputSchema":{"description":"Include full JSON input schemas for returned tools. Defaults to false to keep context small.","type":"boolean"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"set_custom_field_values","description":"Set or clear custom field values for a CRM entity. Values are stored as strings; pass null to clear a value.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"entityType":{"type":"string","enum":["account","contact","deal","booking","ticket","product","post"],"description":"Entity type"},"entityId":{"type":"string","description":"Entity ID"},"values":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"definitionId":{"type":"string","description":"Custom field definition ID"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Value to store, or null to clear"}},"required":["definitionId","value"]},"description":"Values to upsert"}},"required":["entityType","entityId","values"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"set_primary_contact","description":"Set a contact as the primary contact for its CRM account and demote other contacts on that account.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"contactId":{"type":"string","description":"The contact ID to make primary"}},"required":["contactId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"set_resource_availability","description":"Add an availability window for a resource. Use day-of-week + recurring=true for weekly schedules, or a specific date for one-off blocks.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"resourceId":{"type":"string","description":"Resource ID"},"startTime":{"type":"string","description":"HH:MM (24h)"},"endTime":{"type":"string","description":"HH:MM (24h)"},"type":{"description":"Default available","type":"string","enum":["available","blocked"]},"dayOfWeek":{"description":"Day of week (0=Sun..6=Sat)","type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"date":{"description":"YYYY-MM-DD for a specific date instead of dayOfWeek","type":"string"},"isRecurring":{"description":"Default true","type":"boolean"}},"required":["resourceId","startTime","endTime"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"set_segment_members","description":"Replace the members of a STATIC customer segment with the given account IDs. The segment is converted to STATIC.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"segmentId":{"type":"string","description":"The segment ID"},"accountIds":{"maxItems":1000,"type":"array","items":{"type":"string"},"description":"CRM account IDs to set as segment members"}},"required":["segmentId","accountIds"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"set_service_tier_pricing","description":"Set the complete pricing and booking-policy configuration for one membership tier on a booking service.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Booking service ID"},"tierId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Membership tier ID"},"priceOverride":{"anyOf":[{"type":"string","pattern":"^\\d+(?:\\.\\d{1,2})?$"},{"type":"null"}]},"discountPercent":{"anyOf":[{"type":"string","pattern":"^\\d+(?:\\.\\d{1,2})?$"},{"type":"null"}]},"advanceBookingDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"timeSlotPricing":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"minItems":1,"type":"array","items":{"type":"string","enum":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},"startTime":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"endTime":{"type":"string","pattern":"^(?:(?:[01]\\d|2[0-3]):[0-5]\\d|24:00)$"},"price":{"type":"number","minimum":0},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":{"type":"string","maxLength":200}},"required":["dayOfWeek","startTime","endTime","price"],"additionalProperties":false}},{"type":"null"}]},"bookingLimits":{"anyOf":[{"type":"object","properties":{"isAllowed":{"type":"boolean"},"dailyBookingCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"weeklyBookingCount":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"weeklyHoursLimit":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"maxBookableTimeslots":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["isAllowed","dailyBookingCount","weeklyBookingCount","weeklyHoursLimit"],"additionalProperties":false},{"type":"null"}]}},"required":["serviceId","tierId","priceOverride","discountPercent","advanceBookingDays","timeSlotPricing","bookingLimits"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"set_staff_availability","description":"Add an availability window for a staff member (companyMembers.id). Use day-of-week + recurring for weekly schedules, or a specific date for one-off changes.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"memberId":{"type":"string","description":"companyMembers.id of the staff"},"startTime":{"type":"string","description":"HH:MM (24h)"},"endTime":{"type":"string","description":"HH:MM (24h)"},"type":{"description":"Default available","type":"string","enum":["available","blocked"]},"dayOfWeek":{"description":"Day of week (0=Sun..6=Sat)","type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]},"date":{"description":"YYYY-MM-DD for a specific date instead of dayOfWeek","type":"string"},"isRecurring":{"description":"Default true","type":"boolean"}},"required":["memberId","startTime","endTime"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"switch_company","description":"Issue a new MCP access token scoped to another company/organisation. This does not mutate the current MCP connection: the client must use the returned token on later /mcp requests. Platform operators should prefer explicit-company admin tools when available.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"companyId":{"type":"string","description":"The company ID to switch to (use list_my_companies to find available IDs)"}},"required":["companyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"undo_campaign_send","description":"Undo a campaign send during its one-minute safety buffer. Use immediately when the merchant says to stop or undo a submitted campaign.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Buffered campaign ID to return to its prior draft state"}},"required":["campaignId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_account","description":"Update CRM account/customer profile fields such as name, phone, email, life stage, owner, notes, or member code.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"accountId":{"type":"string","description":"The account ID to update"},"name":{"description":"Account/customer display name","type":"string"},"firstName":{"description":"First name for individual accounts","anyOf":[{"type":"string"},{"type":"null"}]},"lastName":{"description":"Last name for individual accounts","anyOf":[{"type":"string"},{"type":"null"}]},"email":{"description":"Email address","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"description":"Phone number","type":"string"},"type":{"description":"Account type","type":"string","enum":["individual","business","household"]},"lifeStage":{"description":"CRM life stage","type":"string","enum":["lead","active","churned","vip"]},"source":{"description":"Acquisition source","type":"string","enum":["walk_in","online","pos","whatsapp","referral","import","api","shopify","woocommerce","email"]},"assignedTo":{"description":"Assigned team member user ID, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"description":"Internal notes","type":"string"},"memberCode":{"description":"Merchant member code, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"referredByAccountId":{"description":"Referrer account ID, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"gender":{"description":"Gender","type":"string"},"dateOfBirth":{"description":"YYYY-MM-DD date of birth, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["accountId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_booking_settings","description":"Update global booking settings. Pass only the fields you want to change.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"globalCooldownDays":{"description":"Minimum days between customer bookings, or null to disable","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"cooldownMessage":{"description":"Optional message shown when cooldown blocks a booking","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"blockUntilFinished":{"description":"Block customers from booking again while they have active bookings","type":"boolean"},"showCoupon":{"description":"Show coupon field in booking flow","type":"boolean"},"showAccessPass":{"description":"Show access pass/package options in booking flow","type":"boolean"},"accessPassBeforeMinutes":{"description":"Minutes before booking start when the access QR becomes usable","type":"integer","minimum":0,"maximum":1440},"accessPassAfterMinutes":{"description":"Minutes after booking end when the access QR remains usable","type":"integer","minimum":0,"maximum":1440},"calendarStyle":{"description":"Booking flow calendar presentation","type":"string","enum":["list","calendar"]},"hideUnavailableTimeslots":{"description":"Hide unavailable timeslots instead of showing them as full","type":"boolean"},"bookingReminderEnabled":{"description":"Send the default pre-booking reminder","type":"boolean"},"bookingReminderLeadHours":{"description":"Hours before booking start for the default reminder","type":"integer","minimum":1,"maximum":168},"sameDayReminderEnabled":{"description":"Send an additional same-day reminder before booking start","type":"boolean"},"sameDayReminderLeadHours":{"description":"Hours before booking start for the same-day reminder","type":"integer","minimum":1,"maximum":24},"allowMemberCancellation":{"description":"Allow members to cancel bookings from the customer portal","type":"boolean"},"memberReschedulingMode":{"description":"Choose whether rescheduling is disabled, merchant-only, or available to members","type":"string","enum":["disabled","merchant_only","member"]},"memberCancellationCutoffHours":{"description":"Hours before booking start when member cancellation closes, or null for no cutoff","anyOf":[{"type":"integer","minimum":0,"maximum":720},{"type":"null"}]},"minimumAdvanceBookingMinutes":{"description":"Minutes before slot start when customer booking closes. null/0 = no cutoff; set > 0 to require advance notice","anyOf":[{"type":"integer","minimum":0,"maximum":43200},{"type":"null"}]},"requireBookingConfirmation":{"description":"Require merchant confirmation before bookings are confirmed","type":"boolean"}},"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_campaign","description":"Update an existing campaign, including audience exclusions. Channel cannot be changed after creation. Pass only fields to change.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID"},"name":{"description":"Name","type":"string"},"status":{"description":"New campaign status","type":"string","enum":["DRAFT","SCHEDULED","PAUSED","CANCELLED"]},"recipientSource":{"description":"Recipient source: all | segment | individual | csv | list","type":"string","enum":["all","segment","individual","csv","list"]},"segmentId":{"description":"Segment ID","anyOf":[{"type":"string"},{"type":"null"}]},"recipientIds":{"description":"Explicit customer account IDs","type":"array","items":{"type":"string"}},"audienceExclusions":{"description":"Optional exclusions: accountIds contains specific customer account IDs; campaignIds contains previous campaign IDs whose accepted recipients must be omitted. Pass empty arrays to clear exclusions.","type":"object","properties":{"accountIds":{"default":[],"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"campaignIds":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","minLength":1}}}},"channelConfig":{"description":"For email, use subject + htmlBody + optional plainTextBody. Legacy html is normalized to htmlBody.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"scheduledAt":{"description":"Scheduled timestamp (ISO 8601)","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["campaignId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_category","description":"Update a CMS post category.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"categoryId":{"type":"string","description":"Category ID"},"name":{"description":"Name","type":"string"},"slug":{"description":"URL slug","type":"string"},"description":{"description":"Description","anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"}},"required":["categoryId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_contact","description":"Update fields on an existing contact.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"contactId":{"type":"string","description":"The contact ID"},"name":{"description":"Name","type":"string"},"email":{"description":"Email address","type":"string"},"phone":{"description":"Phone number","type":"string"},"jobTitle":{"description":"Job title","type":"string"},"isPrimary":{"description":"Mark as the primary contact","type":"boolean"}},"required":["contactId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_custom_field","description":"Update a custom field definition label, type, options, required flag, or sort order.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"definitionId":{"type":"string","description":"Custom field definition ID"},"fieldLabel":{"description":"Human-readable label","type":"string","minLength":1},"fieldType":{"description":"Field type","type":"string","enum":["text","number","date","select","multiselect","boolean","url","email","phone"]},"options":{"description":"Allowed values for select/multiselect fields","type":"array","items":{"type":"string"}},"isRequired":{"description":"Whether this field is required","type":"boolean"},"sortOrder":{"description":"Display order","type":"number"}},"required":["definitionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_deal","description":"Update a CRM deal. Pass only fields to change; use null for nullable links/fields to clear them.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"dealId":{"type":"string","description":"The deal ID"},"name":{"description":"Deal name","type":"string"},"accountId":{"description":"Linked CRM account ID, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"contactId":{"description":"Linked contact ID, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"amount":{"description":"Deal amount, or null to clear","anyOf":[{"type":"number"},{"type":"null"}]},"closingDate":{"description":"Expected closing date, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"description":"Pipeline stage, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"probability":{"description":"Win probability, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"dealType":{"description":"Deal type/category, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"description":{"description":"Deal notes or description, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]},"ownerId":{"description":"Owner user/team member ID, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["dealId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_deal_stage","description":"Move a deal to a different pipeline stage.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"dealId":{"type":"string","description":"The deal ID"},"stage":{"type":"string","enum":["discovery","qualified","proposal","negotiation","won","lost","lead","new","open"],"description":"New pipeline stage. \"lead\", \"new\" and \"open\" are accepted aliases of \"discovery\"."},"probability":{"description":"Optional win probability (percent string)","type":"string"},"lostReason":{"description":"Required when moving to lost","type":"string"}},"required":["dealId","stage"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_order_status","description":"Update the status of a shop order (e.g. confirm, ship, cancel).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"orderId":{"type":"string","description":"The order UUID"},"status":{"type":"string","enum":["pending","confirmed","processing","shipped","delivered","cancelled","refunded"],"description":"New order status"}},"required":["orderId","status"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_outlet","description":"Update an existing shop outlet/location by ID.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"id":{"type":"string","description":"Outlet ID (UUID)"},"name":{"description":"Outlet name","type":"string"},"address":{"description":"Street address","anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"description":"Contact phone","anyOf":[{"type":"string"},{"type":"null"}]},"latitude":{"description":"Latitude","anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"longitude":{"description":"Longitude","anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"logoUrl":{"description":"Logo URL","anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"description":"Display sort order","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isActive":{"description":"Whether outlet is active","type":"boolean"},"acceptsOrders":{"description":"Whether outlet accepts online orders","type":"boolean"}},"required":["id"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_post","description":"Update an existing CMS post (any post type). Only provided fields are changed.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"type":{"description":"Change post type (e.g. blog_post → treatment). Slug is re-checked for uniqueness under the new type.","type":"string"},"title":{"description":"Post title","type":"string"},"slug":{"description":"URL slug (must be unique per company+type).","type":"string"},"blocks":{"description":"Replaces the entire ordered block array. Use append_post_block / replace_post_block / remove_post_block / reorder_post_blocks for per-block edits. Each block: { id, version, type, data }. Types: paragraph, heading, image, list, quote, code, divider, spacer, embed, html, youtube, file, faq, callout, gallery, cta, accordion, product, columns.","type":"array","items":{"$ref":"#/definitions/__schema0"}},"featuredImage":{"description":"Cover image URL","type":"string"},"status":{"description":"Post status","type":"string","enum":["draft","scheduled","published","archived"]},"visibility":{"description":"Visibility","type":"string","enum":["public","private","members_only"]},"excerpt":{"description":"Plain-text summary only — never JSON. Omit to leave unchanged.","type":"string"},"categoryIds":{"description":"Category IDs","type":"array","items":{"type":"string"}},"tagIds":{"description":"Tag IDs to sync (replaces existing tags)","type":"array","items":{"type":"string"}},"meta":{"description":"Custom field values; merged shallowly with existing meta. Use this for structured data, not excerpt.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"seoTitle":{"description":"SEO title override","type":"string"},"seoDescription":{"description":"SEO description override","type":"string"},"parentId":{"description":"Parent post ID for nested types.","anyOf":[{"type":"string"},{"type":"null"}]},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"},"publishedAt":{"description":"Publish timestamp (ISO 8601)","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["postId"],"$schema":"http://json-schema.org/draft-07/schema#","definitions":{"__schema0":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"paragraph"},"data":{"type":"object","properties":{"html":{"type":"string"}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"heading"},"data":{"type":"object","properties":{"level":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"text":{"type":"string","minLength":1},"anchor":{"type":"string"}},"required":["level","text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"image"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["url","alt"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"list"},"data":{"type":"object","properties":{"ordered":{"type":"boolean"},"items":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["ordered","items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"quote"},"data":{"type":"object","properties":{"text":{"type":"string","minLength":1},"cite":{"type":"string"}},"required":["text"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"code"},"data":{"type":"object","properties":{"lang":{"type":"string"},"code":{"type":"string","minLength":1}},"required":["lang","code"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"divider"},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"spacer"},"data":{"type":"object","properties":{"size":{"type":"string","enum":["sm","md","lg"]}},"required":["size"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"embed"},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["youtube","vimeo","iframe"]},"url":{"type":"string","format":"uri"},"aspectRatio":{"type":"string"}},"required":["provider","url"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"html"},"data":{"type":"object","properties":{"html":{"type":"string","minLength":1}},"required":["html"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"youtube"},"data":{"type":"object","properties":{"videoId":{"type":"string","pattern":"^[A-Za-z0-9_-]{11}$"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"startSeconds":{"type":"integer","minimum":0,"maximum":9007199254740991},"aspectRatio":{"type":"string"}},"required":["videoId"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"file"},"data":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"mimeType":{"type":"string","minLength":1},"sizeBytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"originalName":{"type":"string","minLength":1},"displayName":{"type":"string"},"icon":{"type":"string","enum":["pdf","doc","image","video","audio","generic"]}},"required":["url","mimeType","sizeBytes","originalName"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"faq"},"data":{"type":"object","properties":{"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"question":{"type":"string","minLength":1},"answer":{"type":"string"}},"required":["id","question","answer"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"callout"},"data":{"type":"object","properties":{"tone":{"type":"string","enum":["info","success","warning","danger","note"]},"title":{"type":"string"},"body":{"type":"string","minLength":1}},"required":["tone","body"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"gallery"},"data":{"type":"object","properties":{"layout":{"type":"string","enum":["grid","masonry","carousel"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"},"caption":{"type":"string"}},"required":["url","alt"]}}},"required":["layout","images"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"cta"},"data":{"type":"object","properties":{"label":{"type":"string","minLength":1},"href":{"type":"string","minLength":1},"style":{"type":"string","enum":["primary","secondary","ghost"]},"openInNewTab":{"type":"boolean"}},"required":["label","href"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"accordion"},"data":{"type":"object","properties":{"semantic":{"type":"string","enum":["faq","plain"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"body":{"type":"string"}},"required":["id","title","body"]}}},"required":["items"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"product"},"data":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"layout":{"type":"string","enum":["card","inline"]}},"required":["slug"]}},"required":["id","version","type","data"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","const":"columns"},"data":{"type":"object","properties":{"columns":{"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"span":{"type":"number","exclusiveMinimum":0},"blocks":{"type":"array","items":{"allOf":[{"$ref":"#/definitions/__schema0"}]}}},"required":["blocks"]}},"stackBelow":{"type":"string","pattern":"^(0|[0-9]+(\\.[0-9]+)?(px|rem|em|vw|vh|%))$"},"align":{"type":"string","enum":["start","center","stretch"]}},"required":["columns"]}},"required":["id","version","type","data"]}]}}}},{"name":"update_post_type","description":"Update a custom post type. Built-in types (blog_post, page) cannot be modified.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"},"label":{"description":"Display label","type":"string"},"labelPlural":{"description":"Plural display label","type":"string"},"icon":{"description":"Icon name or URL","anyOf":[{"type":"string"},{"type":"null"}]},"supportsCategories":{"description":"Allow categories on this post type","type":"boolean"},"supportsFeaturedImage":{"description":"Allow a featured image","type":"boolean"},"supportsNesting":{"description":"Allow parent/child nesting","type":"boolean"},"supportsExcerpt":{"description":"Allow an excerpt field","type":"boolean"},"supportsBlocks":{"description":"Allow content blocks (rich body)","type":"boolean"},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"}},"required":["postTypeId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_post_type_field","description":"Update a field on a post type schema. Changing fieldType or flipping required=true is blocked when posts already use the field unless force=true is passed.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postTypeId":{"type":"string","description":"Post type ID"},"fieldId":{"type":"string","description":"Field ID"},"label":{"description":"Display label","type":"string"},"fieldType":{"description":"Field type","type":"string","enum":["text","textarea","richtext","number","boolean","date","datetime","select","multiselect","url","email","image","file","gallery","attachments","repeater"]},"required":{"description":"Whether the field is required","type":"boolean"},"helpText":{"description":"Help text shown next to the input","anyOf":[{"type":"string"},{"type":"null"}]},"options":{"description":"For URL fields, { uploadable: true } enables file upload while preserving a URL string in meta.","anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"fields":{"description":"Child fields for fieldType=\"repeater\".","anyOf":[{"type":"array","items":{"type":"object","properties":{"key":{"description":"snake_case key for this repeater child field. Auto-derived from label if omitted.","type":"string"},"label":{"type":"string","description":"Human-readable child field label"},"fieldType":{"type":"string","enum":["text","textarea","richtext","number","boolean","date","datetime","select","multiselect","url","email","image","file","gallery","attachments","repeater"],"description":"Child field type. Repeaters support scalar/select types plus singular upload fields: text, textarea, richtext, number, boolean, date, datetime, select, multiselect, url, email, image, file. Nested repeaters and array upload fields are not supported."},"required":{"description":"Whether this child field is required on every repeater row","type":"boolean"},"helpText":{"description":"Optional hint shown in the UI","type":"string"},"options":{"description":"For select/multiselect child fields: { choices: [\"a\",\"b\"] }.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"sortOrder":{"type":"number"}},"required":["label","fieldType"]}},{"type":"null"}]},"sortOrder":{"description":"Sort order (lower = earlier)","type":"number"},"force":{"description":"Override safety guards. Required to change fieldType or flip required=true on a field that already has data in posts.","type":"boolean"}},"required":["postTypeId","fieldId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_product","description":"Update an existing product. Only provided fields are changed.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"productId":{"type":"number","description":"The product ID"},"name":{"description":"Product name","type":"string"},"description":{"description":"Product description","type":"string"},"price":{"description":"Price as decimal string","type":"string"},"discountPrice":{"description":"Discounted price","type":"string"},"memberPrice":{"description":"Members-only price","type":"string"},"sku":{"description":"SKU code","type":"string"},"status":{"description":"Product status","type":"string","enum":["DRAFT","ACTIVE","ARCHIVED"]},"categoryIds":{"description":"Category IDs (first is primary). Replaces all existing categories.","type":"array","items":{"type":"number"}}},"required":["productId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_promotion","description":"Update an existing promotion. Pass only the fields you want to change.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"promotionId":{"type":"string","description":"Promotion ID"},"name":{"description":"Name","type":"string"},"code":{"description":"Promotion code","type":"string"},"value":{"description":"Discount value (numeric or decimal string)","type":"string"},"type":{"description":"Type","type":"string","enum":["percentage","fixed_amount"]},"status":{"description":"Status filter","type":"string","enum":["active","inactive","expired"]},"startsAt":{"description":"Start timestamp (ISO 8601)","anyOf":[{"type":"string"},{"type":"null"}]},"endsAt":{"description":"End timestamp (ISO 8601)","anyOf":[{"type":"string"},{"type":"null"}]},"usageLimitTotal":{"description":"Total usage limit across all customers","anyOf":[{"type":"number"},{"type":"null"}]},"usageLimitPerCustomer":{"description":"Usage limit per customer","anyOf":[{"type":"number"},{"type":"null"}]}},"required":["promotionId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_segment","description":"Update an existing customer segment by id. Pass only the fields to change; criteria replaces the existing rules.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"segmentId":{"type":"string","description":"The segment ID to update"},"name":{"description":"New segment name","type":"string"},"description":{"description":"New segment description","type":"string"},"segmentType":{"description":"Change segment type","type":"string","enum":["STATIC","DYNAMIC"]},"criteria":{"description":"Replace dynamic criteria, or null to clear criteria","anyOf":[{"type":"object","properties":{"operator":{"type":"string","enum":["AND","OR"],"description":"How to combine conditions"},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Condition type, e.g. TOTAL_SPENDINGS, DAYS_SINCE_JOINED, PASS_STATUS, CUSTOM_FIELD"},"operator":{"type":"string","description":"Comparison operator, e.g. GT, GTE, LT, LTE, EQ, NEQ, IN, NOT_IN, CONTAINS, BEFORE, AFTER, IS_EMPTY"},"threshold":{"description":"Numeric threshold for numeric conditions","type":"number"},"days":{"description":"Days window for time-based conditions","type":"number"},"value":{"description":"Single value for text/date/selection/custom-field conditions","anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"values":{"description":"Multiple values for IN/NOT_IN conditions","type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"definitionId":{"description":"Custom field definition ID for custom-field segment conditions","type":"string"},"fieldName":{"description":"Custom field name for custom-field segment conditions","type":"string"},"fieldType":{"description":"Custom field type for custom-field segment conditions","type":"string"}},"required":["type","operator"]},"description":"Filter conditions"}},"required":["operator","conditions"]},{"type":"null"}]}},"required":["segmentId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_service","description":"Update an existing booking service. Pass only the fields you want to change.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"serviceId":{"type":"string","description":"Service ID to update"},"name":{"description":"Name","type":"string"},"description":{"description":"Description","type":"string"},"durationMinutes":{"description":"Duration of one booking in minutes","type":"number"},"price":{"description":"Decimal string, e.g. \"80.00\"","type":"string"},"capacity":{"description":"Participants per slot","type":"number"},"categoryId":{"description":"Category ID","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"Status filter","type":"string","enum":["active","inactive","archived"]},"visibility":{"description":"Visibility: public | members_only | hidden","type":"string","enum":["public","members_only","hidden"]},"requiresStaff":{"description":"Whether the service requires staff assignment","type":"boolean"},"requiresResource":{"description":"Whether the service requires a resource (room/equipment)","type":"boolean"},"requiresConfirmation":{"description":"If true, bookings start pending and need explicit confirmation","type":"boolean"},"requireLogin":{"description":"If true, guests cannot book without an account","type":"boolean"},"cooldownMinutes":{"description":"Cooldown minutes between bookings","type":"number"},"commissionType":{"description":"Commission type: \"fixed\" or \"percentage\"","anyOf":[{"type":"string","enum":["fixed","percentage"]},{"type":"null"}]},"commissionValue":{"description":"Commission amount as decimal string","anyOf":[{"type":"string"},{"type":"null"}]},"commissionCurrency":{"description":"Commission currency (ISO code)","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["serviceId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_service_package","description":"Update an existing service package. Pass only the fields you want to change.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"packageId":{"type":"string","description":"Service package ID to update"},"name":{"description":"Name","type":"string","minLength":1,"maxLength":200},"description":{"description":"Description","anyOf":[{"type":"string"},{"type":"null"}]},"sessionCount":{"description":"Number of sessions in the package","type":"integer","minimum":1,"maximum":100},"price":{"description":"Decimal string, e.g. \"80.00\"","type":"number","minimum":0},"validDays":{"description":"Validity period in days","type":"integer","minimum":1,"maximum":3650},"applicableType":{"description":"What this package applies to: services | products | both","type":"string","enum":["ALL","ALL_BOOKINGS","ALL_EVENTS","SELECTED"]},"status":{"description":"Status filter","type":"string","enum":["ACTIVE","INACTIVE"]},"applicableItems":{"description":"Item IDs the package can be redeemed against","type":"array","items":{"type":"object","properties":{"itemType":{"type":"string","enum":["booking_service","event"]},"itemId":{"type":"string"}},"required":["itemType","itemId"]}}},"required":["packageId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_service_schedule","description":"Update a service schedule window. Pass only fields to change.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"scheduleId":{"type":"string","description":"Schedule ID"},"date":{"description":"Date (YYYY-MM-DD)","type":"string"},"startTime":{"description":"Start time (HH:mm)","type":"string"},"endTime":{"description":"End time (HH:mm)","type":"string"},"maxCapacity":{"description":"Maximum capacity for this slot","type":"number"},"staffId":{"description":"Staff member ID","anyOf":[{"type":"string"},{"type":"null"}]},"resourceId":{"description":"Resource ID (room/equipment)","anyOf":[{"type":"string"},{"type":"null"}]},"recurrence":{"description":"Recurrence rule: none | daily | weekly | monthly","type":"string","enum":["none","daily","weekly","monthly"]},"recurrenceInterval":{"description":"Recurrence interval (e.g. every N weeks)","type":"number"},"byWeekday":{"description":"Weekdays (0=Mon..6=Sun) for weekly recurrence","anyOf":[{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},{"type":"null"}]},"recurrenceEndDate":{"description":"Recurrence end date (YYYY-MM-DD)","anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"description":"Free-form notes","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["scheduleId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_survey","description":"Update a survey draft or publishing configuration. Use questionBlocks to replace the ordered form block list.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"},"title":{"description":"Survey title","type":"string","minLength":1},"description":{"description":"Survey description","anyOf":[{"type":"string"},{"type":"null"}]},"slug":{"description":"URL slug","type":"string"},"status":{"description":"Survey status","type":"string","enum":["draft","published","closed","archived"]},"visibility":{"description":"Survey access mode","type":"string","enum":["public","members_only","token_only","private"]},"questionBlocks":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Ordered survey question blocks"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Survey settings such as allowMultipleResponses, collectEmail, collectIpAddress, requireAuthentication, showProgress, successMessage"},"openAt":{"description":"Optional ISO datetime when the survey opens","anyOf":[{"type":"string"},{"type":"null"}]},"closeAt":{"description":"Optional ISO datetime when the survey closes","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["surveyId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_tag","description":"Rename or recolor an existing CRM tag.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"tagId":{"type":"string","description":"The tag ID to update"},"name":{"description":"New tag name","type":"string"},"color":{"description":"New color, or null to clear","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["tagId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_task","description":"Update a task (status, priority, assignee, due date, completion).","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"taskId":{"type":"string","description":"The task ID"},"status":{"description":"Status filter","type":"string","enum":["todo","in_progress","blocked","done"]},"priority":{"description":"Priority","type":"string","enum":["low","medium","high","urgent"]},"title":{"description":"Title","type":"string"},"description":{"description":"Description","type":"string"},"assigneeId":{"description":"Assignee user ID","type":"string"},"dueDate":{"description":"Due date (ISO 8601)","type":"string"}},"required":["taskId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"update_ticket_status","description":"Update the status of an existing support ticket.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"ticketId":{"type":"string","description":"The ticket ID to update"},"status":{"type":"string","enum":["open","in_progress","waiting_customer","resolved","closed"],"description":"New status"}},"required":["ticketId","status"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"upload_post_cover_from_url","description":"Download an external image URL into R2 and attach it as the post's featuredImage. Replaces the manual flow of pasting external URLs (which break when the source goes down). Validates content-type starts with `image/` and rejects payloads larger than 20 MB. No AI credits charged — only standard storage.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"postId":{"type":"string","description":"The post ID"},"sourceUrl":{"type":"string","format":"uri","description":"Public http(s) URL to fetch the image from. Must respond with an image/* content-type."}},"required":["postId","sourceUrl"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"upsert_survey_workflow","description":"Create or update a survey automation workflow, usually triggered by survey_response_submitted.","write_action":true,"price_micros":0,"input_schema":{"type":"object","properties":{"surveyId":{"type":"string","description":"Survey ID"},"workflowId":{"description":"Existing workflow ID when updating","type":"string"},"name":{"type":"string","minLength":1,"description":"Workflow name"},"status":{"description":"Workflow status","type":"string","enum":["draft","active","disabled"]},"trigger":{"description":"Trigger name, default from graph.trigger","type":"string"},"graph":{"type":"object","properties":{"trigger":{"type":"string","minLength":1},"nodes":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"edges":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["trigger","nodes","edges"],"description":"Workflow graph definition"}},"required":["surveyId","name","graph"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"validate_campaign","description":"Validate a campaign before sending. Resolves contactable recipient count and previews the final email subject/body without sending.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"campaignId":{"type":"string","description":"Campaign ID to validate"}},"required":["campaignId"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"validate_promotion","description":"Check if a promotion code is valid for a given order. Returns isValid, discount amount, and an error code/message if invalid. Use before applying to a checkout.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"promotionCode":{"type":"string","description":"The code customer entered"},"channel":{"type":"string","enum":["booking","event","online","pos"],"description":"Where the promo is being applied"},"amount":{"type":"number","description":"Order subtotal in major units (dollars, not cents)"},"accountId":{"description":"Customer account ID — used for per-customer usage limits","type":"string"}},"required":["promotionCode","channel","amount"],"$schema":"http://json-schema.org/draft-07/schema#"}},{"name":"void_invoice","description":"Void an invoice. Destructive — invoice can no longer be paid or edited; existing payments are preserved as history. Cannot void invoices that are already PAID or VOIDED.","write_action":false,"price_micros":0,"input_schema":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice ID to void"}},"required":["invoiceId"],"$schema":"http://json-schema.org/draft-07/schema#"}}],"scan":{"score":87,"grade":"A","scanned_at":"2026-09-27T12:14:05.869Z","report":{"scannerVersion":"0.1.9","scannedAt":"2026-09-27T12:14:05.849Z","components":{"code":{"score":-1,"max":25,"notes":["remote-only server, no package to scan"]},"reliability":{"score":17,"max":20,"notes":["remote reachable in 2830ms"]},"poisoning":{"score":15,"max":15,"notes":["230 tool descriptions checked"]},"auth":{"score":8,"max":15,"notes":["API key sent as a header"]},"maintenance":{"score":15,"max":15,"notes":["last push 12 days ago"]},"identity":{"score":10,"max":10,"notes":["registry namespace matches repository owner","GitHub account older than a year","website matches verified namespace"]}},"findings":[],"inputs":{"probes":[{"url":"https://api.favcrm.io/mcp","reachable":true,"authRequired":false,"latencyMs":2830,"serverInfo":{"name":"favcrm","version":"1.0.0"}}],"packages":[],"repo":{"found":true,"owner":"favcrm","repo":"mcp","archived":false,"pushedAt":"2026-09-15T08:57:29Z","stars":0,"forks":1,"openIssues":0,"ownerType":"Organization","ownerAvatarUrl":"https://avatars.githubusercontent.com/u/182138199?v=4","ownerCreatedAt":"2024-09-19T17:25:40Z","license":"MIT"},"icon":{"url":"https://favcrm.io/favicon.ico","source":"site","width":64,"height":64},"presence":{"stars":0,"forks":1,"downloadsWeek":null,"license":"MIT","lastPushAt":"2026-09-15T08:57:29.000Z","score":23}}}},"grade_history":[],"reviews":[]}