{"server":{"name":"raabta","url":"https://raabta.komyosys.ai/mcp","protocol":"2025-06-18"},"tools":[{"name":"list_tickets","permission":"tickets:read","description":"List or search support tickets (newest activity first). Search matches ticket number, customer name/phone, summary and message text.","input":{"type":"object","properties":{"status":{"type":"string","enum":["active","open","pending","resolved","closed"],"description":"active = open or pending"},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"assignee_email":{"type":"string"},"search":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20}},"required":[]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"get_ticket","permission":"tickets:read","description":"Full ticket: details, complete timeline (customer/agent/AI messages incl. voice-note transcripts, internal notes, status changes), pending reply drafts and the customer's previous tickets. Each message has a message_id (for split_ticket / forward_message).","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"}},"required":["ticket_number"]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"get_stats","permission":"tickets:read","description":"Support statistics for the last N days: volume, status/category/priority breakdown, response and resolution times, SLA breaches, customer rating.","input":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":365,"default":30}},"required":[]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"list_team","permission":"tickets:read","description":"Active human support staff (name, email, role). Use the email to assign tickets.","input":{"type":"object","properties":{},"required":[]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"get_activity","permission":"tickets:read","description":"Audit log: who did what and when (staff, AI, customers, system), with before → after values. Optionally for one ticket.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Optional: only this ticket"},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50}},"required":[]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"get_customer","permission":"tickets:read","description":"Customer profile by WhatsApp phone number (digits with country code): name, company, email, notes, custom fields, ticket history, average rating.","input":{"type":"object","properties":{"phone":{"type":"string"}},"required":["phone"]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"search_knowledge","permission":"knowledge:read","description":"Search the organization's knowledge base (help articles / FAQ) used to answer customers.","input":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":20,"default":5}},"required":["query"]},"read_only":true,"destructive":false,"messages_customers":false},{"name":"upsert_knowledge","permission":"knowledge:write","description":"Create a knowledge-base article, or update one by article_id. Write clear question-style titles and step-by-step answers.","input":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"article_id":{"type":"string","description":"Omit to create"}},"required":["title","content"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"add_note","permission":"notes:write","description":"Add an internal note to a ticket. Only the support team sees notes, never the customer.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"text":{"type":"string"}},"required":["ticket_number","text"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"create_draft","permission":"drafts:write","description":"Propose a reply to the customer. A human agent reviews it in the dashboard and decides whether to send it.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"text":{"type":"string"}},"required":["ticket_number","text"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"update_ticket","permission":"tickets:write","description":"Change a ticket's status, priority, category, summary or assignee. Only the given fields change. assignee_email \"\" unassigns.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"status":{"type":"string","enum":["open","pending","resolved","closed"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"category":{"type":"string","enum":["billing","payment","technical","account","delivery","complaint","sales","general"]},"summary":{"type":"string"},"assignee_email":{"type":"string"}},"required":["ticket_number"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"set_tags","permission":"tickets:write","description":"Add and/or remove tags (labels) on a ticket. New tag names are created automatically. Returns the ticket's tags.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"add":{"type":"array","items":{"type":"string"}},"remove":{"type":"array","items":{"type":"string"}}},"required":["ticket_number"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"snooze_ticket","permission":"tickets:write","description":"Snooze a ticket: hide it from the Active inbox until a time (at most 90 days ahead). It comes back by itself then, or at once when the customer writes. Give until (ISO time) or hours; neither = unsnooze now. The alert when it is back goes to alert_email (a team member, see list_team), else the ticket's assignee.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"until":{"type":"string","description":"ISO 8601 time, e.g. 2026-11-02T09:00:00+05:00"},"hours":{"type":"number","minimum":0.1,"maximum":2160,"description":"Instead of until: snooze for this many hours"},"alert_email":{"type":"string"}},"required":["ticket_number"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"pin_ticket","permission":"tickets:write","description":"Pin a ticket to the top of a team member's own Inbox (each person has at most 10 pins), or unpin it (pin: false). Pins belong to a person, so name them by email (see list_team).","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"member_email":{"type":"string"},"pin":{"type":"boolean","default":true}},"required":["ticket_number","member_email"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"follow_ticket","permission":"tickets:write","description":"Make a team member follow a ticket (they get alerts about customer replies and changes), or stop following (follow: false). Name them by email (see list_team).","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"member_email":{"type":"string"},"follow":{"type":"boolean","default":true}},"required":["ticket_number","member_email"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"split_ticket","permission":"tickets:write","description":"\"New ticket from here\": when a customer raises a new issue in the same chat, move that message and every later one to a new ticket for the same customer. Both tickets are linked. Take message_id from get_ticket's timeline. Returns new_ticket_number.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"message_id":{"type":"string","description":"message_id of the first message of the new issue"}},"required":["ticket_number","message_id"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"merge_tickets","permission":"tickets:write","description":"Merge a duplicate ticket of the SAME customer into this one: its messages, notes, drafts and tags move here and the duplicate is closed. Cannot be undone. For related tickets of different customers use link_tickets.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"The ticket to keep"},"duplicate_number":{"type":"integer"}},"required":["ticket_number","duplicate_number"]},"read_only":false,"destructive":true,"messages_customers":false},{"name":"link_tickets","permission":"tickets:write","description":"Link two related tickets (e.g. different customers with the same problem), or unlink them (unlink: true). Linked tickets show in each ticket's linked_ticket_numbers.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"other_number":{"type":"integer"},"unlink":{"type":"boolean","default":false}},"required":["ticket_number","other_number"]},"read_only":false,"destructive":false,"messages_customers":false},{"name":"close_quiet_tickets","permission":"tickets:bulk","description":"Close open/pending chats with no message for `days` days (default 7, at least 3), oldest first, at most 200 per call. Snoozed and merged tickets are skipped. Customers are not messaged; if one writes again a new ticket opens. Call with dry_run: true first to see which tickets would close.","input":{"type":"object","properties":{"days":{"type":"integer","minimum":3,"maximum":365,"default":7},"limit":{"type":"integer","minimum":1,"maximum":200,"default":200},"dry_run":{"type":"boolean","default":false}},"required":[]},"read_only":false,"destructive":true,"messages_customers":false},{"name":"send_message","permission":"messages:send","description":"Send a WhatsApp text reply directly to the ticket's customer. The customer sees it immediately; it is marked as sent by this AI. Pass an idempotency_key to make retries safe: the same key never sends twice. If the result says delivery is unknown, do not resend automatically.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket number as shown to people, e.g. 1001"},"text":{"type":"string"},"idempotency_key":{"type":"string","description":"Unique per message you intend to send, e.g. a UUID. Reusing it returns the first result."}},"required":["ticket_number","text"]},"read_only":false,"destructive":false,"messages_customers":true},{"name":"forward_message","permission":"messages:send","description":"Forward a message (its text, and a copy of its file) from one ticket to another ticket's customer. The customer sees it immediately; it counts toward this key's daily send limit. Take message_id from get_ticket's timeline. Pass an idempotency_key to make retries safe. If the result says delivery is unknown, do not resend automatically.","input":{"type":"object","properties":{"ticket_number":{"type":"integer","description":"Ticket the message is on"},"message_id":{"type":"string"},"to_ticket_number":{"type":"integer","description":"Ticket whose customer receives it"},"idempotency_key":{"type":"string","description":"Unique per forward you intend, e.g. a UUID. Reusing it returns the first result."}},"required":["ticket_number","message_id","to_ticket_number"]},"read_only":false,"destructive":false,"messages_customers":true}],"prompts":[{"name":"morning_triage","title":"Morning triage","description":"What needs attention today: urgent and late chats, who is waiting longest, what is unassigned.","permissions":["tickets:read"],"arguments":[]},{"name":"reply_drafts","title":"Draft replies for waiting chats","description":"Reads chats waiting for a reply and saves a reply draft on each for the team to approve. Sends nothing.","permissions":["tickets:read","drafts:write"],"arguments":[{"name":"limit","description":"How many chats at most (default 5)","required":false}]},{"name":"ticket_deep_dive","title":"Ticket deep dive","description":"Everything about one ticket: what happened, what the customer wants, history, and the best next step.","permissions":["tickets:read"],"arguments":[{"name":"ticket_number","description":"Ticket number, e.g. 1001","required":true}]},{"name":"quiet_chats_review","title":"Review quiet chats","description":"Lists chats nobody has replied to for a number of days (dry run) and asks before closing them.","permissions":["tickets:read","tickets:bulk"],"arguments":[{"name":"days","description":"Quiet for at least this many days (default 7)","required":false}]},{"name":"weekly_report","title":"Weekly support report","description":"A short report of the last 7 days: volume, speed, who handled what, recurring questions.","permissions":["tickets:read"],"arguments":[]}]}