activate_agent
ChatGPTTurn one agent on. From then on it answers inbound messages on its lines by itself. In DRAFT mode it parks each reply for approval; in SUPERVISED or AUTO mode it sends replies to contacts with no person in the loop. The agent needs at least one line and instructions. A member, or a credential limited to some lines, can activate only an agent whose every line it holds.
add_agent_opt_out
ChatGPTStop one agent from answering a phone number or an email address, on every line of the agent. People on the team can still write to that contact. A handle already on the list stays as it is (created: false). A member, or a credential limited to some lines, can change only the list of an agent whose every line it holds.
add_email_account
ChatGPTAdd an IMAP/SMTP email account to the caller's org. Tests connectivity before persisting; password is encrypted at rest. Returns existing channel id when the address is already linked in the same org; when that account still waits on its history choice, this call makes the choice again. Returns a CONFLICT_OTHER_ORG result when the address is locked to a different workspace. A new account starts to sync at once. Set importHistoryDays to also import older mail (0 = all history); without it, only mail that arrives from now on syncs.
add_knowledge_file
ChatGPTAdd one document to the workspace's knowledge. CommSync reads its text in the background. Then agents and Ask can answer from it. Use a document with readable text: PDF, Word, a spreadsheet, plain text, Markdown, CSV, HTML, or an image (CommSync reads the text in it). A calendar file does not work. The file is at most 15 MB. Returns the new source with status PENDING. Call list_knowledge_sources later to see READY or ERROR. The embeddings draw on the workspace's AI credits. A workspace has at most 20 sources. To make an agent use the document, call set_agent_knowledge. Owners and admins can use this tool; a member can use it when the workspace lets members use agents. A credential limited to some lines cannot use it.
add_knowledge_text
ChatGPTAdd a block of plain text to the workspace's knowledge, for example opening hours, a price list, or a return policy. CommSync stores it as a .txt document named after the title. So it acts like any uploaded document: list it with list_knowledge_sources, and remove it with delete_knowledge_source. To change the text, delete the source and add it again. Returns the new source with status PENDING. The text is at most 15 MB. The embeddings draw on the workspace's AI credits. A workspace has at most 20 sources. To make an agent use the text, call set_agent_knowledge. Owners and admins can use this tool; a member can use it when the workspace lets members use agents. A credential limited to some lines cannot use it.
add_note_item
ChatGPTAdd one checklist item to the caller's private note on one conversation. Creates the note when there is none. Returns the whole note.
add_phone_number
ChatGPTAdd a phone number that the user already has at an SMS provider to the caller's workspace. CommSync does not sell phone numbers. The workspace must first have a connected SMS provider account (Twilio, Skyetel, JustCall, or Quo), which the user connects in CommSync onboarding. With no account, the tool returns NO_SMS_PROVIDER_ACCOUNT, and its text is written for the user: pass it on as it is. A Twilio account imports its numbers automatically, so this tool does not add a Twilio number. With exactly one connected account, the tool uses it. With more than one, pass provider and the account id; PROVIDER_ACCOUNT_REQUIRED lists them. The add runs the same checks as Settings: no duplicate, one workspace per number, and the plan's line cap. Returns the existing line when the workspace already has the number, and CONFLICT_OTHER_ORG when another workspace holds it. A new line also starts the inbox classifier over its past senders.
apply_agent_analysis_template
ChatGPTAdd the goals and fields of a starter template to one agent. The templates: general (General), front_desk (Front desk), scheduling (Scheduling), billing (Billing questions), support (Support), sales (Sales leads). A goal or field whose key the agent already has stays as it is, and the add stops at the limits. Returns how many goals and fields it added. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
approve_agent_reply
ChatGPTSend an agent reply that waits for approval, to the contact, from the agent's line. Pass body (and subject for email) to send an edited version; the agent's draft stays on record. A text has at most 1,600 characters and an email at most 20,000. CommSync checks the contact's opt-out and any takeover of the thread again before it sends. Only one approval of a reply can win. Owners and admins only. To retry a call safely, pass the same idempotencyKey: a repeat returns the first message with deduplicated: true and sends nothing.
archive_thread
ChatGPTArchive a thread for the caller. It leaves Spam, Promotions, and Automated. Teammates are not affected. On a Google sign-in line, the thread is also archived in Gmail.
assign_label
ChatGPTAssign a label to a contact (personId) or an identity (identityId). Provide exactly one target.
attach_identity_to_contact
ChatGPTAttach a channel (identity) with no contact to an existing contact. Its conversations join the contact.
bulk_update_threads
ChatGPTApply one action to up to 100 threads for the caller: read, unread, archive, unarchive, trash, restore, inbox, spam, promotions, or automated. A thread the caller cannot open, or whose access is revoked, is skipped and counted in skipped. On a Google sign-in line, read, unread, archive, unarchive, trash, restore, inbox, and spam also change Gmail. Permanent delete is not an action here.
cancel_scheduled_message
ChatGPTStop a scheduled send (status SCHEDULED) before it goes out. The message stays on the thread with status FAILED and the reason "Cancelled before send"; resend_failed_message sends it now. A send that is already going out cannot stop.
change_tier
ChatGPTOWNER only, with a credential that has access to all channels. Swap the org subscription to a new tier. Prorates immediately via Stripe and reflects the change back on the org via webhook. Returns the live billing state after the call.
compose_email
ChatGPTStart a new email conversation with an email address, with optional Cc, Bcc, and attachments. Creates the identity and a fresh RFC 5322 thread. Give bodyText, bodyHtml, or both. At least one is required. Plain text is fine: CommSync builds the HTML part. Pass scheduledFor to send later: the message waits with status SCHEDULED until that time. CommSync accepts the send and owns delivery from there, including provider rate limits: it paces, backs off, and retries, so this tool does not return a 429. The response carries state and estimatedSendAt. A state of "waiting_on_line" means the message is queued and goes out on its own. Each call without an idempotencyKey sends a new message. To retry a call safely, pass the same idempotencyKey: a repeat returns the first message with deduplicated: true and sends nothing.
compose_sms
ChatGPTStart a new SMS or MMS conversation with a phone number. Creates the identity and thread if needed. Pass scheduledFor to send later: the message waits with status SCHEDULED until that time. CommSync accepts the send and owns delivery from there, including provider rate limits: it paces, backs off, and retries, so this tool does not return a 429. The response carries state and estimatedSendAt. A state of "waiting_on_line" means the message is queued and goes out on its own. Each call without an idempotencyKey sends a new message. To retry a call safely, pass the same idempotencyKey: a repeat returns the first message with deduplicated: true and sends nothing.
correct_agent_field_value
ChatGPTFix the captured value of one field of one conversation. The judge's value stays; the correction counts in its place in the filters and the export. The value must fit the field type (a number, true or false, YYYY-MM-DD, YYYY-MM-DDTHH:mm, one of the choices, an email address, a phone number, { amount, currency }, or a list of text); a value that does not fit is refused (BAD_INPUT). Pass value: null to clear the correction. A credential limited to some lines cannot correct a field marked sensitive. Returns the conversation. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
correct_agent_goal_result
ChatGPTOverturn the judge's result for one goal of one conversation. The judge's answer stays; the correction counts in its place in the success score, the filters, and the review flag. A scored goal can take a score (1 to 5); then 4 or 5 is MET and the rest is NOT_MET, whatever result says. A score on a pass-or-fail goal is refused (BAD_INPUT). Pass result: null to clear the correction. Returns the conversation. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
create_agent
ChatGPTCreate a CommSync Agent: an AI teammate that answers inbound texts and email on its lines. The new agent has status DRAFT and no lines, so it answers nothing yet. Next, attach lines with set_agent_lines, then turn it on with activate_agent. Returns the full setup of the agent. The plan of the workspace caps the number of agents (AGENT_CAP). A credential limited to some lines cannot create an agent.
create_agent_alert
ChatGPTAdd an alert to one agent. An alert checks each analyzed conversation of the agent, and checks it again after a person corrects a result. The kinds: CRITICAL_GOAL_NOT_MET: a goal is not met in a conversation (goalId null means any critical goal). GOAL_RATE_BELOW: the met rate of a goal over the last windowConversations analyzed conversations (10 to 500) falls below thresholdPercent (1 to 99); give goalId too. FIELD_MATCHES: a captured detail matches fieldOperator and fieldValue; give fieldId too. The operators: EQUALS, NOT_EQUALS, CONTAINS, GREATER_THAN, LESS_THAN, IS_TRUE, IS_FALSE (the last two take no value). The parts of the other kinds are cleared. Read goal and field ids with get_agent_analysis. An alert notifies the owners and admins of the workspace by push, and by email when email is true. It never contacts a contact. One conversation fires one alert once, even after a re-run or a correction. The conversation also goes on the Review page with the reason. An agent has at most 20 alerts (ALERT_CAP). Returns the alert. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
create_agent_field
ChatGPTAdd a field to one agent. A field is a detail to capture from a conversation. Give name, description (what to capture), and type: TEXT, NUMBER, INTEGER, BOOLEAN, DATE, DATETIME, CHOICE (with at least two choices), EMAIL, PHONE, MONEY (with a three-letter currency, default USD), or TEXT_LIST. Optional: key, examples, scope, sensitive (left out of webhooks and of credentials limited to some lines), and enabled. A value of the wrong type, or one that looks like a code or a password, stays empty. A key that the agent already has is refused (KEY_TAKEN). Saving runs nothing and spends nothing; try a draft field first with try_agent_analysis. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
create_agent_goal
ChatGPTAdd a goal to one agent. A goal is a question that a model answers after a conversation ends. Give name and description (what success means; the model reads it as the question). Optional: key (lower snake case, stable for the API and the webhook; made from the name when left out), scoring (PASS_FAIL, or SCORE_1_5 with five levels, 1 first), passExample and failExample, scope (CONVERSATION, or AGENT_PART: only the part where this agent answered), useKnowledge (the judge also reads what the agent read, to catch an invented fact), weight (1 to 5, for the success score), critical, channels (SMS, EMAIL, or both), appliesWhen (when set, the model first decides if the goal applies; if not, the result is NOT_APPLICABLE and the goal stays out of the rates), and enabled. A key that the agent already has is refused (KEY_TAKEN). Saving runs nothing and spends nothing; try a draft goal first with try_agent_analysis. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
create_agent_test
ChatGPTSave a test for one agent. A test is a conversation plus what passes. NEXT_REPLY: the agent answers the last message and must take path (REPLY, HAND_OFF, or NO_REPLY); for REPLY, a model judges the reply against criteria, with an optional goodExample and badExample. TOOL_CALL: the agent must call tool (a webhook tool name, mcp_<server>_<tool>, or search_knowledge); each of inputs checks one input as EXACT (the same text), PATTERN (a JavaScript regular expression of at most 200 characters, with no back reference and no repeated group that holds a repeat or a choice), or DESCRIBE (a model judges the value against the description). A dotted input name reads into an object. SIMULATION: a model plays the contact that contact describes, the agent answers up to maxTurns times (1 to 10, default 5), and a model judges whether the conversation reached goal. Give conversation to type the conversation, or fromConversation to copy a real one as it stood at one incoming message; the result then also holds sentReply, the reply that was really sent after that message, if any. Saving runs nothing and spends nothing. Run the test with run_agent_tests. An agent has at most 50 tests. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
create_contact
ChatGPTCreate a contact with a name and optional notes. It has no channels and no conversation yet: attach_identity_to_contact adds a channel, and the first message makes a conversation.
create_label
ChatGPTCreate a new label with a name and hex color (e.g. "#F97316").
create_todo
ChatGPTAdd a to-do to Home. Give threadId to tie it to a conversation the caller can open, or omit it for a to-do with no conversation. On one conversation, a to-do title must be unique.
delete_agent
ChatGPTDelete one agent for good. It stops answering on every line at once, and its activity, memories, and opt-out list go with it. Messages it already sent stay in their threads. You cannot undo this; to stop an agent for a while, use pause_agent. A member can delete only an agent whose every line they hold. A credential limited to some lines cannot delete an agent.
delete_agent_alert
ChatGPTDelete one alert for good, with the record of when it fired. You cannot undo it. To stop an alert and keep it, set enabled to false with update_agent_alert. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
delete_agent_field
ChatGPTDelete one field for good, with every value it captured. You cannot undo it. To stop a field and keep its values, set enabled to false with update_agent_field. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
delete_agent_goal
ChatGPTDelete one goal for good, with every result it gave. You cannot undo it. To stop a goal and keep its results, set enabled to false with update_agent_goal. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
delete_agent_memory
ChatGPTDelete what one agent remembers about one contact. The agent answers that contact next time with no summary, and starts a new one. Use it when the memory is wrong or out of date. You cannot undo this. A member, or a credential limited to some lines, can delete only a memory of an agent whose every line it holds.
delete_agent_test
ChatGPTDelete one saved test for good. You cannot undo it. Past runs keep their results under the test name. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
delete_contact
ChatGPTDelete a contact that the caller owns. Each of its channels first becomes its own unnamed contact again, with its own conversation; messages and threads stay. If one channel cannot be detached, the delete stops and the contact stays.
delete_draft
ChatGPTDelete one draft of the caller. The draft text is gone for good. Its attachments stay unlinked and are removed later if no message uses them.
delete_email_account
ChatGPTDelete a mailbox from the workspace. OWNER or ADMIN, or the member who connected the mailbox. The messages and conversations of the mailbox stay. For a mailbox connected with Sign in with Google, CommSync also revokes the grant at Google.
delete_knowledge_source
ChatGPTDelete one knowledge source for good: the stored file, the crawled pages, and the search index. Every agent that used it stops answering from it at once. You cannot undo it. To get it back, add the file or the website again. Owners and admins can use this tool; a member can use it when the workspace lets members use agents. A credential limited to some lines cannot use it.
delete_label
ChatGPTDelete a label. This removes the label from all contacts and identities.
delete_mcp_connection
ChatGPTDelete one MCP connection and its stored credentials. Every agent that uses it loses its tools at once, and Ask stops using it. This cannot be undone: to use the server again, add it again and sign in again. A credential limited to some lines cannot use this tool.
delete_message
ChatGPTHide one message from the caller's view of the thread. The message stays for teammates, and on the mail server. A hidden message answers CHANNEL_ACCESS_REVOKED to a second call.
delete_note_item
ChatGPTDelete one checklist item from the caller's private note on one conversation. Returns the whole note.
delete_phone_number
ChatGPTDelete a phone number from the workspace. OWNER or ADMIN only. The messages and conversations of the number stay. For a Twilio number, CommSync also removes its SMS webhook and voice settings at Twilio, where they still point at CommSync.
delete_thread
ChatGPTMove a thread to the caller's Trash. Teammates still see it. The trash sweep removes the caller's view after 30 days; restore_thread brings it back before then. On a Google sign-in line, the thread also moves to Gmail trash.
delete_webhook
ChatGPTDelete a webhook endpoint and its delivery history. IRREVERSIBLE. Pending retries for this endpoint will no-op.
delete_webhook_tool
ChatGPTDelete one webhook tool for good, with its stored secrets. Every agent that carries it loses it at once. You cannot undo it. Owners and admins can use this tool; a member can use it when the workspace lets members use agents. A credential limited to some lines cannot use it.
dismiss_digest
ChatGPTMark a daily digest as dismissed.
dismiss_waiting
ChatGPTTake one conversation off both waiting lists of Home ("Mark completed" or "Stop waiting on this"). A newer message puts it back. Only Home changes: the inbox and the conversation stay the same. dismissed=false puts it back now.
download_attachment
ChatGPTGet the bytes of one attachment as base64, for a file of 5 MB or less. A larger file answers FILE_TOO_LARGE with its size; read its text with get_attachment instead.
draft_agent_instructions
ChatGPTWrite a first version of an agent's standing orders from a name, a role, and a short brief. It saves nothing: pass the text to create_agent or update_agent. Each call spends a small amount of the workspace's AI credits, and fails with AI_BUDGET when the credits are gone. At most 10 calls a minute (RATE_LIMITED).
evaluate_agent
ChatGPTRun a batch of test cases against one agent and check each result. Each case is a real conversation or a typed one, optional tool mocks, and what a pass means: the outcome, what happens to the reply, texts the reply must or must not contain, and tools the agent must or must not call. Returns passed and failed counts, and for each case the failed checks and the full test result. At most 10 cases per call. Each case is one dry run: nothing is sent, and each spends AI credits like a real reply.
export_agent_conversations
ChatGPTExport the conversations that match the filters as CSV text, at most 1000 rows: the times, the agents, the channels, the contact, the outcome in words, the success score, the mood, the frustration, the counts, the reply time, the edit rate, the cost, the review flag, the mean rating, and one column per goal ("<agent>: <goal>", the result words plus "(n/5)" when scored) and per field ("<agent>: <field>"). Corrections count. Fields marked sensitive stay out unless includeSensitive is true, which only an owner or admin on a credential with every line can ask for. Filters (all optional, all must match): agentIds, lineIds (mailbox or number ids of its threads), channels (SMS, EMAIL), from and to (ISO 8601, on the start), status (OPEN, ENDED), outcomes, analysis (DONE, NONE, PENDING, FAILED), successMin and successMax (0 to 100), goals (each { goalId, results: [MET | NOT_MET | UNKNOWN | NOT_APPLICABLE], corrected? }; a person’s correction counts in place of the judge), fields (each { fieldId, op: eq | neq | gt | gte | lt | lte | between | in | contains | empty | not_empty, value | values | min and max }; dates are YYYY-MM-DD), moods, frustrationMin, toolsUsed (tool names), toolErrored, takenOver, editedBeforeApproval (a person changed more than 5 percent of a draft), heldBySafety, optedOut, rated, ratingMin and ratingMax, hasNote, needsReview (a critical goal not met or a thumbs down, not marked reviewed), reviewed, costMin and costMax (USD), messagesMin and messagesMax (messages from the contact), and search (contact, title, or summary). Read goal and field ids with get_agent_analysis.
forward_message
ChatGPTForward a message to a new recipient. The source thread must be visible to the caller. A forward to email starts a new thread on the mailbox of the source message (or the first mailbox this credential can use) and carries the source files unless includeAttachments is false. A forward to SMS carries the text only. CommSync accepts the send and owns delivery from there, including provider rate limits: it paces, backs off, and retries, so this tool does not return a 429. The response carries state and estimatedSendAt. A state of "waiting_on_line" means the message is queued and goes out on its own. Each call without an idempotencyKey sends a new message. To retry a call safely, pass the same idempotencyKey: a repeat returns the first message with deduplicated: true and sends nothing.
get_agent
ChatGPTGet the setup of one agent: name, role, status, autonomy mode, safety level, instructions, tone, signature, reply limits, quiet hours, group email settings, and each line with the task the agent handles there. It returns no credentials and no connected-tool secrets.
get_agent_analysis
ChatGPTRead the analysis setup of one agent: the settings (analysis on or off, the depth, the end windows in minutes, the sample rate, the minimum contact messages, and the summary and mood switches), every goal with its counts over the last 30 days (met, not met, unknown, does not apply; a person's correction counts in place of the judge's answer, and only the current version counts), and every field with the number of analyzed conversations that gave a value. An agent has at most 30 goals and 40 fields. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
get_agent_analysis_overview
ChatGPTThe numbers of the Analysis Overview dashboard for a range of up to 400 days, over the same conversations that search_agent_conversations lists for the same filters (the range replaces the dates of the filters; a conversation counts by its start). Returns: totals and previous (the period of the same length before from): conversations, ended, analyzed, resolvedByAgent, handedToPerson, takenOver, successScore (mean, 0 to 100), medianFirstReplySeconds, costUsd, costPerConversation, needsReview, turns by status (pendingApproval is the count waiting now), and judgeAgreement (checked, corrected, rate: how often a person agreed with the AI). series: one point per hour, day, or week (it follows the range) in tz. goals: met, not met, unknown, and does not apply per goal (a person's correction wins), the met rate, the trend, and the agreement. fields: how often each field was captured, with the split, the spread, or the top values; a field marked sensitive shows no values. breakdowns by agent (with turns), line, channel, and breakdownFieldId (a choice or yes-or-no field). tools: calls, errors, error rate, and median time per tool. Filters (all optional, all must match): agentIds, lineIds (mailbox or number ids of its threads), channels (SMS, EMAIL), from and to (ISO 8601, on the start), status (OPEN, ENDED), outcomes, analysis (DONE, NONE, PENDING, FAILED), successMin and successMax (0 to 100), goals (each { goalId, results: [MET | NOT_MET | UNKNOWN | NOT_APPLICABLE], corrected? }; a person’s correction counts in place of the judge), fields (each { fieldId, op: eq | neq | gt | gte | lt | lte | between | in | contains | empty | not_empty, value | values | min and max }; dates are YYYY-MM-DD), moods, frustrationMin, toolsUsed (tool names), toolErrored, takenOver, editedBeforeApproval (a person changed more than 5 percent of a draft), heldBySafety, optedOut, rated, ratingMin and ratingMax, hasNote, needsReview (a critical goal not met or a thumbs down, not marked reviewed), reviewed, costMin and costMax (USD), messagesMin and messagesMax (messages from the contact), and search (contact, title, or summary). Read goal and field ids with get_agent_analysis. A member, or a credential limited to some lines, counts only the conversations whose every agent sits on its lines; a credential limited to some lines also needs every thread line in its scope.
get_agent_conversation
ChatGPTRead one agent conversation with its analysis: the same view as one row of list_agent_conversations. The caller needs the line rule for every agent that took part. A credential limited to some lines needs every thread of the conversation on its lines, and it sees no field marked sensitive.
get_agent_conversation_transcript
ChatGPTRead the transcript of one agent conversation: its messages in time order (at most 300, the newest kept), each with who sent it (contact, agent, or teammate), the time, the subject, the text, and the file names. Security mail stays withheld, the same as for the agent. After each message that started an agent turn comes a step: the agent, the status, the tools it called and whether each one failed, the routing, the safety checks that held the draft, who approved it and how much they changed it (editShare, 0 to 1), the draft when it never went out or a person changed it, and the reason of a handoff. A turn the gate skipped is a short step with its skipReason. The caller needs the line rule for every agent that took part.
get_agent_stats
ChatGPTOutcome counts and AI spend of every agent in the workspace over the last days days: sent, waiting for approval, escalated, skipped, rejected, and failed turns, the spend in USD, and the time of the last turn.
get_agent_test_run
ChatGPTRead one run of an agent's saved tests, or the newest run when you leave out runId. Returns the status (RUNNING, DONE, STOPPED), the progress (finished of total), the passed, failed, and error counts, the cost, agentChanged (true when the agent changed after the run started), the failure groups (failed results grouped by cause), the stop reason, and each result: the test, the attempt, the status (PASSED, FAILED, ERROR), the reason in plain words, and the detail (the outcome, the reply, the tool calls, the input checks, or the simulated conversation). Set failedOnly to leave out the passed results. Returns run: null when the agent has no run.
get_agent_turn
ChatGPTOne agent turn in full, to learn why the agent did what it did. It has everything list_agent_turns shows, plus the full draft, the step trace (each tool call with its input, row count, time, and error), the model's final text, the agent's note on an escalation or a decline, the route decision on a line with many agents (source, reason, confidence, previous agent), the safety-check reasons, and the cost in USD. The trigger message is a 500-character preview. A member, or a credential limited to some lines, sees only the turns on the lines it holds.
get_agent_version
ChatGPTOne version of an agent, with its snapshot: setup (name, role, instructions, tone, language, signature, rules, reply style), settings (mode, safety level, limits, quiet hours, group email, footer, analysis settings), lines (with the task text of each), tools (knowledge sources, MCP connections with their enabled tools, webhook tools), tests, goals, and fields.
get_ai_settings
ChatGPTGet the caller’s AI settings: the master switch, the label and inbox classifiers (with their thresholds), the Daily Brief schedule, thread titles, Ask, the writing tools, dictation, and to-dos. configured says whether the server has an AI key. spendCap is the workspace’s monthly AI spend cap in USD, its month-to-date spend, and whether the caller can change it.
get_attachment
ChatGPTGet one attachment: filename, type, size, document kind, the message and thread it is on, and one page of its extracted text (PDF text, image OCR, document contents). When the result has nextOffset, more text follows: call again with offset set to nextOffset. textStatus says why a file has no text.
get_billing_state
ChatGPTGet the billing state of the caller's workspace: the tier and subscription status, who bills it (provider: STRIPE, APPLE, GOOGLE, ADMIN, or null) and where the owner manages it (management), the seat count, the trial end and the deletion date of a cardless trial, cardOnFile, a tier that waits for the next store renewal, the caps (lines, storage bytes, agents) and the usage, the storage-full halt, the AI-credit balances with the auto-top-up settings (micro-USD strings), and the storage add-on blocks. Any member can call it, with a credential that has access to all channels. isOwner says whether the caller can use the tools that change billing.
get_contact
ChatGPTGet one contact with its channels and the caller’s permissions on it, the same as the contact page. Works for the caller’s own contact and for a contact that a teammate shared with the caller. A shared contact never shows its owner’s notes. The caller’s own contact also lists its labels and its details (title, company, address, website).
get_draft
ChatGPTGet one draft of the caller: recipients, subject, the plain-text body (bodyText for email, smsBody for SMS), the sending line, the schedule, and the attachments.
get_identity
ChatGPTGet a single identity (phone number or email address) with its associated contact.
get_message
ChatGPTGet one message by id, in the same compact shape as a get_thread_messages row. Answers MESSAGE_NOT_FOUND when the message does not exist, is hidden for the caller, or is outside the lines of the credential.
get_profile
ChatGPTGet the current user profile (id, email, name, createdAt).
get_send_capacity
ChatGPTReport how fast CommSync can currently send on each line the caller can access, and whether any line is waiting out a provider rate limit. sustainedPerMinute is the rate a line holds without queueing. A faster rate is not an error: CommSync queues and paces everything it accepts, so the extra messages wait longer. waitingUntil is set when a provider asked CommSync to pause; messages queued on that line go out on their own once it clears.
get_send_options
ChatGPTList the lines this credential can reply from on one thread: the phone numbers or mailboxes that took part in the conversation, plus the default line of the caller (participated: false). preselected* is the line the app picks first. When a send tool gets no line id on an existing thread, it uses the first line here that took part. For a group thread, groupReply says whether a reply can reach every member and, when it cannot, which app to reply in.
get_shared_contact
ChatGPTGet one shared contact: the name, the contact's addresses and numbers, the members with their permits, and the caller's permit.
get_team
ChatGPTGet one team: its contacts, its lines (identities), its members with their permits, its new-conversation policy, and the caller's permit.
get_thread_agent_status
ChatGPTWhich agent covers one conversation, and whether a person took the conversation over (takenOverAt). On a line with many agents this is the agent that owns the thread, else the default agent of the line. agent is null when no agent covers the thread, or when the workspace limits agents to owners and admins and the caller is a member. Any member who can see the thread can use this tool.
get_thread_draft
ChatGPTGet the caller's unsent reply draft on one conversation, for one channel. Returns null when there is no reply draft.
get_thread_messages
ChatGPTGet the messages of a thread in time order, in a compact shape: plain-text body, sender, direction, status, origin (from and via), attachments, call details, one-time code, caution flag, labels, and read and star state. A body longer than maxBodyChars is cut and flagged. afterId polls for newer messages; before pages back.
get_thread_note
ChatGPTGet the caller's private note on one conversation: the free text, the color, and the checklist items (id, text, checked). Returns null when the caller has no note there. Teammates never see this note.
get_thread_summary
ChatGPTGet one thread in the same compact shape as a list_threads row. Answers THREAD_NOT_FOUND when the thread does not exist or is outside the lines of the credential.
get_todays_digest
ChatGPTGet the Daily Brief: the missed replies, priorities, and suggested actions of one day, plus dueLine (the bills and trials due soon, or null). With no date, returns the newest brief, the one the AI panel opens first. Before the 4 PM run of a day, that is the brief of the day before, which the 9 AM catch-up refreshed; isToday says which day it is. With a date, returns the brief of that date. A key or app that is limited to some lines gets only the items on those lines, and no headline or summary.
get_unread_counts
ChatGPTGet the number of threads with unread messages in each folder for the caller: inbox, all, automated, promotions, spam, archived, and deleted. A thread counts once, however many of its messages are unread.
get_webhook
ChatGPTGet a single webhook endpoint by id. No secret returned.
hand_thread_back_to_agents
ChatGPTEnd a takeover. The agents on the line answer the next inbound message in this thread again; this call sends nothing by itself. Any member who can see the thread can use this tool.
hard_delete_thread
ChatGPTPermanently delete a thread that is in the caller's Trash (move it there with delete_thread first; otherwise the answer is THREAD_NOT_IN_TRASH). While a teammate still holds the thread, only the caller's view is removed (scope: self). When nobody else holds it, the thread, its messages, and its files are deleted, and the email messages are also removed from the mail server (scope: canonical). This cannot be undone.
list_agent_alerts
ChatGPTList the alerts of one agent. Each alert has its kind, its parts, email, enabled, sentence (what it watches, in words), lastFiredAt, firedLast30Days, and broken (true when the goal or the field it names was deleted: it cannot fire). A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
list_agent_conversations
ChatGPTList the conversations of one agent, newest first, the open ones included. An agent conversation is one stretch of talk with a contact. It ends after a quiet end window, and it can hold an SMS thread and an email thread of the same contact. Each one has its threads, agents, channels, times, status (OPEN, ENDED), outcome (ANSWERED, HANDED_TO_PERSON, NO_REPLY_NEEDED, CONTACT_STOPPED, UNFINISHED), counts, reply times, edit rate, cost, and the analysis: its status (NONE with a note, PENDING, RUNNING, DONE, FAILED), title, summary, mood, frustration, success score (0 to 100), each goal result with its reason and quotes, and each captured field. A person's correction replaces the judge's answer. Pass cursor (the nextCursor of the page before) for the next page. A credential limited to some lines sees only the conversations whose every thread is on its lines, and no field marked sensitive. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
list_agent_escalations
ChatGPTConversations that an agent handed to a person and that nobody resolved yet, oldest first (at most 100). Each row has the agent's reason, the trigger message, and the contact name. A turn that failed also waits here, with skipReason TURN_FAILED. Reply in the thread yourself (send_sms or send_email), then call resolve_agent_escalation. Owners and admins only. A credential limited to some lines sees only the escalations on its lines.
list_agent_memories
ChatGPTWhat one agent remembers about each contact it talked to, most recently updated first. Each row has the contact's name and handles, the agent's running summary, the structured facts (preferences, commitments, open items), and the turn count. The agent reads its memory of a contact on every reply to that contact. Pass nextCursor back as cursor for the next page. A member, or a credential limited to some lines, can read only the memories of an agent whose every line it holds.
list_agent_opt_outs
ChatGPTThe phone numbers and email addresses that one agent never answers, newest first. reason says how each one got there: STOP or UNSUBSCRIBE when the contact asked, MANUAL when a person added it. Pass nextCursor back as cursor for the next page. A member, or a credential limited to some lines, can read only the list of an agent whose every line it holds.
list_agent_tests
ChatGPTList the saved tests of one agent, oldest first. A saved test is a conversation plus what passes. Each test has its kind (NEXT_REPLY, TOOL_CALL, SIMULATION), the conversation, the expectation, the stand-in tool results, the conversation it was copied from, and its last result: lastRunAt and lastPassed (true only when every attempt of the last run passed; null when it has not run in its current shape). An agent has at most 50 tests.
list_agent_topics
ChatGPTList the topics of one agent. Each night CommSync groups the analyzed conversations of the last 30 days of each agent with analysis on into 3 to 12 topics. It reads only the titles and the summaries, never the messages. Each topic has its id, name, description, conversationCount, moodCounts (POSITIVE, NEUTRAL, NEGATIVE), successRate (the mean success score, 0 to 100, or null), and computedAt; the counts are of the run that built it. Also returns computedAt of the last run, eligibleConversations (analyzed conversations in the window now), and minConversations (10). Filter conversations by a topic with topicId in search_agent_conversations. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
list_agent_turns
ChatGPTOne agent's activity, newest first. A turn is one time the agent acted on an inbound message, or chose not to. Each turn has the status, the skip reason, the trigger message (sender and a 500-character preview), the draft (cut to 1,000 characters), the sent message id, and the cost. Pass nextCursor back as cursor for the next page. A member, or a credential limited to some lines, sees only the turns on its lines.
list_agent_versions
ChatGPTThe History of one agent, the newest version first. Every save of the setup, the settings, the lines, the tools, the tests, or the goals is a version. Each row has the number, who saved it (null for a system write), when, and a one-line summary of what changed. Pass nextBefore back as before for the next page. A member, or a credential limited to some lines, reads only an agent whose every line it holds.
list_agents
ChatGPTList the workspace's CommSync Agents: the AI teammates that answer inbound texts and email on their lines. Each row has the status (DRAFT, ACTIVE, PAUSED), the autonomy mode (DRAFT parks every reply for approval, SUPERVISED and AUTO send by themselves), the safety level, and the lines. Owners and admins can use this tool; a member can use it when the workspace lets members use agents. A credential limited to some lines sees only the agents on those lines.
list_ai_runs
ChatGPTList recent AI run audit entries (label classifications, inbox classifications, digests): the feature, status, model, target, token counts, and the credit cost in USD. The model output is not returned. A key or app that is limited to some lines gets only the runs on threads of those lines.
list_all_identities
ChatGPTList all identities (phone numbers and email addresses) with their associated contact (max 500).
list_contact_threads
ChatGPTList every conversation that a contact takes part in: 1:1 and group, SMS and email, newest activity first, one page at a time. The same list as the Conversations tab of a contact. Each row is a thread summary (the shape of list_threads) plus participation: isDirect (the 1:1 conversation with the contact), isGroup, and via (the channels of the contact on that thread). Only threads on lines the caller and the credential can read appear. Pass nextCursor back as cursor for the next page.
list_contacts
ChatGPTList the caller’s own contacts with their channels (phone numbers and email addresses) and an unread count, one page at a time. q matches a name or a channel. Pass nextCursor back as cursor for the next page; total comes on the first page only. A contact that a teammate shared with the caller is not in this list; get_contact opens it by id.
list_conversation_variables
ChatGPTThe values that agents' webhook tools stored on one conversation, for example a customer id from a lookup. A later webhook call in the same conversation sends these values, so the model never types them. Each row has the name, the value, and the tool and turn that stored it. Any caller with agents access who can see the thread can use this tool.
list_digests
ChatGPTList the Daily Brief archive, newest date first, one page at a time. Pass nextCursor back as cursor for the next page; it is null on the last page. unreadCount is the number of unread briefs that have items. A key or app that is limited to some lines gets only the items on those lines, and no headline or summary.
list_drafts
ChatGPTList the caller's unsent drafts, newest first. Each row has the draft id, the channel, the thread id of a reply draft, the subject, the recipient, a short preview, the attachment count, and the title of the conversation. Drafts are private to the caller. Paginate with nextCursor.
list_email_accounts
ChatGPTList the mailboxes of the workspace that the caller can access. Each row has authMethod (PASSWORD, or OAUTH for a mailbox connected with Sign in with Google or Microsoft) and backfillStatus (where the import of older mail stands). Credentials are never returned.
list_knowledge_pages
ChatGPTList the pages that CommSync read from one website source, with the number of indexed passages of each page, most passages first. Use it to check what a crawl found. A document source has one entry with a null url. Owners and admins can use this tool; a member can use it when the workspace lets members use agents.
list_knowledge_sources
ChatGPTList the workspace's knowledge sources: the uploaded documents and crawled websites that agents and Ask answer from. Each source has its status (PENDING, PROCESSING, READY, ERROR), the error text of a failed ingest, the page and chunk counts, and the agents it is attached to. summary is the library summary that the Knowledge page last generated, or null. Owners and admins can use this tool; a member can use it when the workspace lets members use agents.
list_labels
ChatGPTList all labels with usage counts (how many contacts and identities carry each label).
list_line_routing
ChatGPTEvery line that has at least one agent, with its routing: the agents on the line and the task, examples, priority, and never-handles fields of each, the default agent, the no-match policy, and the never-reply policy that no agent on the line answers. Read this before set_line_routing. A member, or a credential limited to some lines, sees only the lines it holds.
list_mailing_lists
ChatGPTList the mailing lists and marketing text senders that mail the lines this credential can see, sorted by mail in the last 30 days. Each row has the list name, the sender address, the line, the 30-day count, eight weekly counts (oldest first), the newest message id, and the unsubscribe state (SUBSCRIBED, PENDING, DONE, WAITING_FOR_YOU, FAILED). Use it for "which newsletters send me the most mail" or "what did we unsubscribe from".
list_mcp_connections
ChatGPTList the workspace's connections to external MCP servers. Each row has the name, the URL, the auth type (NONE, BEARER, or OAUTH), whether OAuth sign-in is done, the enabled tool allowlist (empty means no tool is live), the status, the last error, and the ids of the agents that use it. Pass agentId to list only the connections of one agent. No credential is returned. Owners and admins can use this tool; a member can use it when the workspace lets members use agents.
list_orphaned_identities
ChatGPTList identities not attached to any contact (max 500). These are candidates for creating a new contact or attaching to an existing one.
list_pending_agent_replies
ChatGPTAgent replies that wait for a person, oldest first (at most 100). Each row has the full draft, the trigger message, the contact name, and any safety-check reasons that held it. Send one with approve_agent_reply or drop it with reject_agent_reply. Owners and admins only. A credential limited to some lines sees only the replies on its lines.
list_phone_numbers
ChatGPTList phone numbers the caller can access in their org.
list_scheduled_messages
ChatGPTList the messages the caller scheduled that have not gone out yet (status SCHEDULED), soonest first, on the lines this credential can access. Each row has the message and thread ids, the channel, the send time, the first recipient, the subject, and a short text preview. Pass nextCursor back as cursor for the next page.
list_shared_contact_threads
ChatGPTList the conversations of one shared contact that the caller can read through it, newest first. The owner of the contact sees only the conversations of their own lines. A member of an archived shared contact sees none. Paginate with nextCursor.
list_shared_contacts
ChatGPTList the shared contacts the caller can see. A shared contact is a contact that its owner shared with teammates at a permit (VIEW, COMMENT, or SEND). Each row has the id, the name, the contact's addresses and numbers, the members, and me (the caller's permit and whether the caller has a line that can reach the contact).
list_team_threads
ChatGPTList the conversations of one team, newest first, one row per contact or group (as the inbox groups them). Only conversations the caller can already read show. Archived, spam, and deleted conversations do not show. Each row has the thread id, title, contact, unread count, and a preview of the last message. Paginate with nextCursor.
list_teams
ChatGPTList the teams the caller can see. A team groups contacts and lines into one view of conversations. Each row has the id, name, color, contact and line counts, the members with their permits, and me (the caller's permit: LENS, VIEW, SEND, or MANAGE). Archived teams only when includeArchived is true.
list_threads
ChatGPTList conversation threads, newest first, in a compact shape: title, line, contact, labels, folder, unread count, and a short preview of the latest message. Only threads on lines the caller can access are returned. Supports cursor pagination, view selection, label filtering, and a receiving-line filter (toPhone/toEmail).
list_todos
ChatGPTList the caller's to-dos from Home: the commitments CommSync found in conversations and the ones the caller added. Each row has the id, title, details, due date, priority, status, the thread id (null for a to-do with no conversation), the counterparty, and the message it came from. OPEN rows sort by due date.
list_waiting
ChatGPTList the two waiting lists of Home. waitingOnMe: conversations where the other party wrote last, so they wait on a reply from the caller, the longest wait first. waitingOnThem: conversations where the caller wrote last and the other party has not answered for 2 days or more. Each row has the thread id, title, counterparty, the time of the last message, and a short preview.
list_webhook_deliveries
ChatGPTPaginated delivery log for an endpoint, newest first. 25 rows per page. Each row has the event type, current status (pending/succeeded/failed/dead), HTTP response code, attempt count, and timestamps.
list_webhooks
ChatGPTList the caller's outbound webhook endpoints. Returns endpoint metadata + tier-cap usage. No secrets ever returned.
mark_agent_conversation_reviewed
ChatGPTMark one conversation reviewed (it leaves the needs-review list), or take the mark away with reviewed: false. Returns the conversation. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
mark_message_read
ChatGPTMark one message as read for the caller. On a Google sign-in line, the message is also marked read in Gmail.
mark_message_unread
ChatGPTMark one message as unread for the caller. On a Google sign-in line, the message is also marked unread in Gmail.
mark_thread_automated
ChatGPTMove a thread into Automated Messages for the caller: important mail that no person wrote, such as receipts, codes, and alerts. It leaves Archived, Spam, and Promotions. The inbox classifier does not move it back.
mark_thread_promotions
ChatGPTMove a thread into Promotions for the caller. It leaves Archived, Spam, and Automated. The inbox classifier does not move it back.
mark_thread_read
ChatGPTMark a thread as read for the caller. Clears the caller's unread count on the thread and on the other chains of the same contact. Teammates are not affected. On a Google sign-in line, the messages are also marked read in Gmail.
mark_thread_spam
ChatGPTMove a thread into Spam for the caller. It leaves Archived, Promotions, and Automated. The inbox classifier does not move it back. On a Google sign-in line, the thread also moves to Gmail spam.
mark_thread_unread
ChatGPTMark a thread as unread for the caller. Sets the caller's unread count to 1. On a Google sign-in line, the thread is also marked unread in Gmail.
merge_contacts
ChatGPTMerge whole contacts: fold one or more source contacts (all channels, labels, notes, team memberships, shared-contact promotion, and conversations) into a surviving contact, then delete the emptied sources. The survivor keeps its name. Irreversible as a whole (individual channels can still be split off later).
merge_identities
ChatGPTPut two channels (identities) under one contact. When neither has a contact, CommSync makes a new one. When one has a contact, the other joins it.
move_thread_to_inbox
ChatGPTClear the Archived, Spam, Promotions, and Automated flags, so the thread shows in the Inbox again. The inbox classifier does not move it back. On a Google sign-in line, the thread also goes back to the Gmail inbox.
mute_thread
ChatGPTMute a thread for the caller. New inbound messages on it no longer raise the caller's unread count, and the thread keeps its place in the list. Teammates are not affected.
pause_agent
ChatGPTPause one agent on all of its lines. A paused agent answers nothing until activate_agent. Replies that already wait for approval stay in the queue. A member, or a credential limited to some lines, can pause only an agent whose every line it holds.
promote_identity_to_contact
ChatGPTMake a new contact from a channel (identity) that has no contact, with a name and optional notes.
query_inbox
ChatGPTRun ONE read-only SQL SELECT (Postgres) over the caller's CommSync inbox and get the rows back. Use it for exact counts, totals, rankings, trends, and joins that the search tools cannot answer: "how many emails did Northwind send this year", "which contacts have I not answered in 30 days", "spend per vendor per month from receipts", "average reply time per line". The tables hold only what this credential can read, so never add a user or org filter. Rules: one SELECT (WITH … SELECT is fine), no writes, no recursion, no schema-qualified names, and only standard aggregate, window, date, text, number, array-reading, JSON-reading, and full-text functions. Nothing that builds a larger value is allowed (no string_agg, array_agg, json_agg, ||, concat, format, replace, repeat, generate_series): return rows and columns. All times are UTC timestamps; compare as timestamps for speed (sent_at > now()::timestamp - interval '30 days'). Aggregate in SQL: at most 500 rows come back, cells longer than 2000 characters are cut, a plan that would cost too much is refused (TOO_EXPENSIVE), and a query stops after 8 seconds. Exclude threads.folder 'spam' and 'trash' unless you mean them. To find a word or phrase, use match_messages('words') or match_attachments('words'), which are indexed. When you sum entities, exclude is_superseded. Open a thread from a result with get_thread_messages. On an error, read the message, fix the SQL, and run it again. Tables: - threads: One row per conversation the caller can read (one SMS conversation or one email chain). Columns: id text, title text (AI title, else the subject, else the counterpart, else the participants), subject text, channel text ('EMAIL' or 'SMS'), line_id text (lines.id of the anchor line), is_group bool, counterpart text (the other party of a 1:1 thread: contact name, else their name or number), participant_emails text[], contact_id text (contacts.id for a 1:1 thread with a saved contact), identity_id text (identities.id for a 1:1 thread with no saved contact), last_message_at timestamp, last_message_direction text ('INBOUND' or 'OUTBOUND'), created_at timestamp, unread_count int, folder text (the first that applies: 'trash', 'spam', 'promotions', 'automated', 'archived', else 'inbox'), snoozed_until timestamp, is_muted bool, is_shared bool (visible through a team, a shared contact, or a share). - messages: One row per message, call, or voicemail on a visible thread. Columns: id text, thread_id text, channel text ('EMAIL' or 'SMS' (calls ride on SMS lines)), direction text ('INBOUND' or 'OUTBOUND'), status text (QUEUED, SCHEDULED, SENT, DELIVERED, FAILED, RECEIVED), sent_at timestamp, from_name text, from_email text (lowercase), from_phone text (E.164), to_phone text, to_emails text[], cc text[], subject text, preview text (first lines of the body), body text (plain text, first 8000 characters; to find words use match_messages, not ILIKE), identity_id text (identities.id of the other party), is_read bool (meaningful for INBOUND messages), is_starred bool, is_call bool, call_outcome text (for a call: ANSWERED, MISSED, VOICEMAIL, and more), call_duration_sec numeric, call_agent text (the teammate on the call), call_summary text, call_transcript text (first 8000 characters), call_sentiment text, origin_kind text (ROUTE, HANDOFF, LIST, or DIRECT (inbound email)), originator_email text (the original sender of a forward), list_key text (the mailing list, when it came from one), open_count int (tracked opens of an outbound email), first_opened_at timestamp, bounce_status text, failure_reason text, scheduled_for timestamp, sent_by_user_id text (the teammate who sent it). - contacts: The caller's own saved contacts. Columns: id text, name text, notes text, created_at timestamp. - identities: One phone number or email address the caller has seen, with its contact when one is saved. Columns: id text, contact_id text, kind text ('PHONE' or 'EMAIL'), value text (E.164 phone or lowercase email), display_name text, category text (NORMAL, AUTOMATED, PROMOTIONS, or SPAM), created_at timestamp. - entities: …
rebuild_agent_topics
ChatGPTBuild the topics of one agent now, without waiting for the nightly run. It runs in the background in about 10 to 40 seconds and replaces the topics of the agent; read the result with list_agent_topics. It is one model call that spends AI credits. The agent needs at least 10 analyzed conversations in the last 30 days (TOO_FEW_CONVERSATIONS). Returns queued and eligibleConversations. Owners and admins only. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
register_webhook
ChatGPTRegister a new outbound webhook endpoint that receives signed POSTs for the caller's events. Returns { endpoint, secret } — the secret is shown ONCE and is not retrievable later; a new secret requires a rotation. URL must be https (http allowed only in dev). SSRF-blocked: private/loopback/link-local hosts are rejected. Tier-capped: STARTER 1, PRO 3, POWER 10 endpoints per user.
reject_agent_reply
ChatGPTReject an agent reply that waits for approval. CommSync sends nothing, and the turn moves to REJECTED in the agent activity. Owners and admins only.
remove_agent_opt_out
ChatGPTLet one agent answer a handle again by removing a MANUAL opt-out that a person added. An opt-out that the contact sent (STOP or UNSUBSCRIBE) cannot be removed: only the contact can take it back (CONTACT_OPT_OUT). A member, or a credential limited to some lines, can change only the list of an agent whose every line it holds.
rerun_agent_analysis
ChatGPTQueue the analysis of one ended agent conversation again, with the current goals and fields. The new results replace the old ones (a person’s corrections stay). It runs in the background in about a minute; read the result with get_agent_conversation. It is one model call that spends AI credits. Refused when the conversation has not ended (NOT_ENDED) or its analysis already waits or runs (RUNNING). The caller needs the line rule for every agent that took part.
rerun_agent_conversations
ChatGPTAnalyze again every ended conversation that matches the filters and whose agents have analysis on, with the current goals and fields. With dryRun (the default) nothing runs: it returns the count and the estimated cost in USD (the count times the mean cost of an analysis in the workspace over the last 30 days). With dryRun: false it checks the AI spend first, then queues them; a conversation whose analysis already waits or runs is not queued again. A filter that matches more than 2000 is refused (TOO_MANY): narrow it. Each analysis spends AI credits. Filters (all optional, all must match): agentIds, lineIds (mailbox or number ids of its threads), channels (SMS, EMAIL), from and to (ISO 8601, on the start), status (OPEN, ENDED), outcomes, analysis (DONE, NONE, PENDING, FAILED), successMin and successMax (0 to 100), goals (each { goalId, results: [MET | NOT_MET | UNKNOWN | NOT_APPLICABLE], corrected? }; a person’s correction counts in place of the judge), fields (each { fieldId, op: eq | neq | gt | gte | lt | lte | between | in | contains | empty | not_empty, value | values | min and max }; dates are YYYY-MM-DD), moods, frustrationMin, toolsUsed (tool names), toolErrored, takenOver, editedBeforeApproval (a person changed more than 5 percent of a draft), heldBySafety, optedOut, rated, ratingMin and ratingMax, hasNote, needsReview (a critical goal not met or a thumbs down, not marked reviewed), reviewed, costMin and costMax (USD), messagesMin and messagesMax (messages from the contact), and search (contact, title, or summary). Read goal and field ids with get_agent_analysis.
reschedule_message
ChatGPTMove a scheduled send (status SCHEDULED) to a new time. The thread must be visible to the caller. A send that is already going out cannot move. list_scheduled_messages gives the ids.
resend_failed_message
ChatGPTRe-queue a failed outbound message for retry. Thread must be visible. A scheduled send that cancel_scheduled_message stopped is a failed message too, and this tool sends it now.
resend_webhook_delivery
ChatGPTRe-enqueue a specific delivery for another attempt. Creates a new WebhookDelivery row with a fresh event id (evt_*). Useful when the receiver was down or you fixed a bug and want to replay an event.
resolve_agent_escalation
ChatGPTMark an agent escalation as handled. It leaves the approval queue; the agent activity keeps it with status ESCALATED. CommSync sends nothing. Owners and admins only.
restore_agent_version
ChatGPTBring back an older version of an agent. The setup, the rules, the reply style, and the settings come back, and a new version records the restore ("Restored version N"). The lines, the tools, the tests, and the goals stay as they are. A change to the mode or the instructions applies to the next reply of an active agent. You cannot restore the newest version (NEWEST). A member, or a credential limited to some lines, can restore only an agent whose every line it holds.
restore_thread
ChatGPTRestore a thread from the caller's Trash. On a Google sign-in line, the thread also leaves Gmail trash.
rotate_webhook_secret
ChatGPTGenerate a new signing secret for an endpoint. The previous secret remains valid for 24h to enable zero-downtime rotation. Returns { endpoint, secret } — the new secret is shown ONCE.
rotate_webhook_tool_secret
ChatGPTMake a new signing secret for one webhook tool. The old secret stops working at once, so the endpoint must change to the new one before the next agent call, or it rejects the signature. Returns signingSecret. CommSync shows it only this once. It does not change the header secrets or the auth secrets. Owners and admins can use this tool; a member can use it when the workspace lets members use agents. A credential limited to some lines cannot use it.
run_agent_test_turn
ChatGPTRun one dry run of an agent: what would it do with this message? It uses the same instructions, tools, model, and safety check as a real reply, on a real conversation or a typed one. Nothing is sent and nothing is written to the conversation. External MCP tools and webhook tools that change something return a stand-in; look-up webhook tools run for real. Returns the outcome (REPLY, HAND_OFF, NO_REPLY, UNFINISHED), the reply, what would happen to it in a real turn, the safety check, every tool call, and the cost. It spends AI credits like a real reply. Works on a paused or draft agent.
run_agent_tests
ChatGPTRun the saved tests of one agent: all of them, or the ones in testIds. Each test runs repeats times (1, 3, or 5), because a model does not answer the same way every time. Each run is a dry run: nothing is sent and nothing is written to a conversation. It spends AI credits like real replies, plus a model call to judge most tests. CommSync runs the tests in the background, three at a time. This tool waits up to 45 seconds. When the run finishes in that time, it returns the full result, the same as get_agent_test_run. Otherwise it returns the run as it stands (status RUNNING); then call get_agent_test_run with the run id. One run holds at most 150 test runs (tests times repeats), and an agent has one run at a time. A member, or a credential limited to some lines, can run only an agent whose every line it holds.
search
ChatGPTSearch across contacts, identities (phone/email), message content, and attachment filenames. Substring and typo-tolerant. Supports Apple Mail-style query modifiers on the messages category: from:<val>, to:<val>, subject:<val>, has:attachment, has:bill|invoice|receipt|subscription|shipment|reservation|deadline|address|phone|security (messages with a smart card of that kind), in:inbox|sent|archived|trash, is:unread|starred|read, before:YYYY-MM-DD, after:YYYY-MM-DD. Modifiers combine freely ("from:priya has:attachment after:2026-01-01"). Message snippets come back with <mark>…</mark> around matched terms.
search_agent_conversations
ChatGPTSearch the agent conversations of the workspace, across every agent the caller may reach. Filters (all optional, all must match): agentIds, lineIds (mailbox or number ids of its threads), channels (SMS, EMAIL), from and to (ISO 8601, on the start), status (OPEN, ENDED), outcomes, analysis (DONE, NONE, PENDING, FAILED), successMin and successMax (0 to 100), goals (each { goalId, results: [MET | NOT_MET | UNKNOWN | NOT_APPLICABLE], corrected? }; a person’s correction counts in place of the judge), fields (each { fieldId, op: eq | neq | gt | gte | lt | lte | between | in | contains | empty | not_empty, value | values | min and max }; dates are YYYY-MM-DD), moods, frustrationMin, toolsUsed (tool names), toolErrored, takenOver, editedBeforeApproval (a person changed more than 5 percent of a draft), heldBySafety, optedOut, rated, ratingMin and ratingMax, hasNote, needsReview (a critical goal not met or a thumbs down, not marked reviewed), reviewed, costMin and costMax (USD), messagesMin and messagesMax (messages from the contact), and search (contact, title, or summary). Read goal and field ids with get_agent_analysis. Sorts: newest, oldest, recent_activity, success_low, success_high, frustration_high, cost_high (default newest). Each row is the view of get_agent_conversation plus agents (id, name, avatarUrl), needsReview, reviewedAt, toolNames, and feedback (ratingAvg, ratings, notes, thumbsDown, and your own rating, note, and thumbs). Returns total for paging. A member, or a credential limited to some lines, sees only the conversations whose every agent sits on its lines. A credential limited to some lines also sees only the conversations whose every thread line is in its scope, and no field marked sensitive.
search_attachments
ChatGPTSearch files by filename and by their extracted text (PDF text, image OCR, document contents), newest first. Pass docKind to find files by what they are (invoice, receipt, contract, and so on); with docKind, query is optional. A file with no docKind has no label, which does not mean it is not that kind. Spam and Trash are included.
search_entities
ChatGPTFind the structured items CommSync read out of messages: bills, invoices, receipts, subscriptions, shipments, reservations, deadlines (REMINDER), phone numbers, street addresses (PLACE), people, and account security events. Newest first by the due date, else the event date, else the message date. Returns compact rows with a plain summary, the formatted amount, and the message and thread ids, plus totals per kind and currency computed by the server. Use it for "what did I spend with Uber in September", "which invoices from Northwind are still open", "which subscriptions renew this month". A security event never carries a link, a token, or a code; the credential's security detail setting decides whether it shows the service, the device, and the place.
search_knowledge
ChatGPTSearch the workspace's knowledge base (uploaded documents and website content) by meaning, the same search Ask and the agents use. Returns up to 6 passages, best first, each with its source name and page address. Each call makes one embedding call that draws on the workspace's AI credits. Owners and admins can use this tool; a member can use it when the workspace lets members use agents.
search_mcp_catalog
ChatGPTSearch the catalog of external MCP servers that CommSync verified as connectable. With no query it returns the official server of each popular product. Each row has the catalog entry id, the name, a description, the URL, the homepage, the auth kind (OPEN or OAUTH), and whether this workspace already connected it. Pass productKey to list every server of one product. Use a catalogEntryId with add_mcp_connection. Owners and admins can use this tool; a member can use it when the workspace lets members use agents.
search_threads
ChatGPTFull thread-centric search — every conversation matching the query, ranked and paginated. Matches message content, thread titles (incl. AI titles), group-thread participants, contact names, and attachment filenames. Returns thread summaries with match context (matched message id + <mark> snippet). Default scope searches everything except Spam & Trash; narrow with the scope filter or in: modifiers.
seats_preview
ChatGPTOWNER only, with a credential that has access to all channels. Preview the prorated charge that would result from setting the org's seat quantity to seats, without actually mutating Stripe. Returns { amountDue, currency, prorationDate }.
semantic_search
ChatGPTSearch messages and file text by meaning instead of keywords. Describe what the content would say, for example "an invoice or payment confirmation with a dollar amount from June". Returns the best-matching threads, one snippet each, with a similarity score. Spam and Trash are left out. Each call embeds the query once through OpenRouter, which draws a small amount of the workspace's AI credits. Answers SEMANTIC_SEARCH_UNAVAILABLE when the server has semantic search turned off.
send_email
ChatGPTSend an email reply within an existing email thread, with optional Cc, Bcc, and attachments. replyMode REPLY_ALL also answers every To and Cc address of the message you answer, worked out by CommSync. On a group thread the reply anchors on the latest inbound sender and defaults to REPLY_ALL. The reply follows the mailbox setting for signatures on replies. Give bodyText, bodyHtml, or both. At least one is required. Plain text is fine: CommSync builds the HTML part. Pass scheduledFor to send later: the message waits with status SCHEDULED until that time. CommSync accepts the send and owns delivery from there, including provider rate limits: it paces, backs off, and retries, so this tool does not return a 429. The response carries state and estimatedSendAt. A state of "waiting_on_line" means the message is queued and goes out on its own. Each call without an idempotencyKey sends a new message. To retry a call safely, pass the same idempotencyKey: a repeat returns the first message with deduplicated: true and sends nothing.
send_sms
ChatGPTSend an SMS or MMS reply within an existing SMS thread. On a 1:1 thread, give the identityId of the recipient. On a group thread (several numbers), the reply goes to every member in one text from the line of the group; a line whose platform cannot text a group returns GROUP_SEND_UNSUPPORTED with the app to reply in. get_send_options tells which lines can reply. Pass scheduledFor to send later: the message waits with status SCHEDULED until that time. CommSync accepts the send and owns delivery from there, including provider rate limits: it paces, backs off, and retries, so this tool does not return a 429. The response carries state and estimatedSendAt. A state of "waiting_on_line" means the message is queued and goes out on its own. Each call without an idempotencyKey sends a new message. To retry a call safely, pass the same idempotencyKey: a repeat returns the first message with deduplicated: true and sends nothing.
set_agent_knowledge
ChatGPTReplace the knowledge sources that one agent answers from. Pass the full list. The agent stops using a source that you leave out, and an empty list removes them all. The sources stay in the workspace. Ask always reads every source; this list changes only the agent. Returns the source ids that the agent uses now. At most 20 ids. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
set_agent_lines
ChatGPTReplace the full list of lines (mailboxes and text numbers) that one agent answers on. A line left out of the list is detached; a detached line that had this agent as its default gets the next agent on the line. A line that stays keeps its task fields. Many agents can share a line; set_line_routing says how they split the work. An empty list detaches every line. Returns the full setup of the agent. A member, or a credential limited to some lines, can attach only lines it holds, and can change only an agent whose every line it holds.
set_agent_mcp_connections
ChatGPTReplace the full list of MCP connections that one agent uses. The agent can call the enabled tools of these connections in its turns. A connection not in the list is removed from the agent; an empty list removes all of them. An agent uses at most 10 connections. Returns the agent's new list, with no credential. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
set_line_routing
ChatGPTSave the routing of one line: the default agent, the no-match policy, the line's never-reply policy, and the task fields of the agents on it. This tool never attaches or detaches an agent (use set_agent_lines). Send defaultAgentId, noMatchPolicy, and assignments every time; read them from list_line_routing first. Returns the saved line. A member, or a credential limited to some lines, can change only a line it holds.
set_members_can_use_agents
ChatGPTTurn on or off the workspace setting that lets members use agents. Off (the default): only owners and admins see and change agents. On: a member can also build and run agents, but only on the lines they hold. The approval queue stays with owners and admins either way. Owners and admins only. A credential limited to some lines cannot change this setting.
set_seats
ChatGPTOWNER only, with a credential that has access to all channels. Set the paid seat quantity on the org. Prorates immediately via Stripe. Use this to grow the seat pool before/after inviting members — adding members alone doesn't auto-grow seats, and removing members never auto-shrinks them.
sign_out_mcp_connection
ChatGPTDelete the OAuth tokens of one connection. The connection and its tool allowlist stay, but agents and Ask cannot use its tools until a person signs in again with start_mcp_sign_in. A credential limited to some lines cannot use this tool.
snooze_thread
ChatGPTSnooze a thread for the caller until a future time. The thread leaves the active folders, and comes back when the time arrives.
split_identity
ChatGPTDetach a channel (identity) from its contact. The channel gets its own conversation again, with no contact.
star_message
ChatGPTStar one message for the caller. Teammates are not affected. On a Google sign-in line, the message is also starred in Gmail.
start_mcp_sign_in
ChatGPTStart the OAuth sign-in of one connection, the same flow as the Sign in button in the CommSync web app. It returns authorizeUrl. A PERSON must open that URL in a browser and approve the access at the vendor. You cannot finish the sign-in yourself, and you must not open the URL on the person's behalf. After the approval the browser returns to the CommSync web app; then call list_mcp_connections to check signedIn. Each call makes the URL of an earlier call stop working. When a stored sign-in is still good, the result is signedIn: true and no URL. A connection with a bearer token cannot use OAuth. A credential limited to some lines cannot use this tool.
take_over_thread
ChatGPTTake one conversation over from the agents. Every agent on the line stops replying in this thread, including an agent added later, until hand_thread_back_to_agents. A reply that waits for approval in this thread cannot be sent while the takeover holds. Any member who can see the thread can use this tool.
test_email_account
ChatGPTTest stored IMAP/SMTP credentials for an email account. Caller must have channel access.
trigger_digest_run
ChatGPTManually trigger a daily digest generation for today or a specific date (at most 90 days back). A key or app that is limited to some lines cannot use this tool: the digest reads every line.
trigger_inbox_backfill
ChatGPTEnqueue an inbox-classifier backfill across the caller’s historical mail. Classifies each not-yet-classified sending identity as PROMOTIONS / SPAM / NORMAL and auto-files its threads into the per-user Spam / Promotions buckets — one classification per sender, since the verdict applies to all of that sender’s threads. unclassifiedSenders is the upper bound the chain will scan. Completion is stamped on inboxBackfillCompletedAt in the AI settings when the last batch finishes. Senders the user has replied to, already filed by hand, or already classified are skipped. A key or app that is limited to some lines cannot use this tool: it files threads on every line.
try_agent_analysis
ChatGPTTry draft goals or fields on the last 5 ended conversations of one agent, or on the conversations in conversationIds, before you save them. Give at most 5 goals and fields in all. A goal is a question that a model answers after a conversation ends. Give name and description (what success means; the model reads it as the question). Optional: key (lower snake case, stable for the API and the webhook; made from the name when left out), scoring (PASS_FAIL, or SCORE_1_5 with five levels, 1 first), passExample and failExample, scope (CONVERSATION, or AGENT_PART: only the part where this agent answered), useKnowledge (the judge also reads what the agent read, to catch an invented fact), weight (1 to 5, for the success score), critical, channels (SMS, EMAIL, or both), appliesWhen (when set, the model first decides if the goal applies; if not, the result is NOT_APPLICABLE and the goal stays out of the rates), and enabled. Returns, for each conversation, its title, the result of each goal (MET, NOT_MET, UNKNOWN, NOT_APPLICABLE, with a score for a scored goal, the reason, and the quotes behind it), and the value of each field. It saves nothing. Each conversation is one model call that spends AI credits. A credential limited to some lines tries only the conversations whose every thread is on its lines. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
unarchive_thread
ChatGPTUnarchive a thread for the caller. On a Google sign-in line, the thread also goes back to the Gmail inbox.
unassign_label
ChatGPTRemove a label from a contact (personId) or an identity (identityId). Provide exactly one target.
unmute_thread
ChatGPTUnmute a thread for the caller. New inbound messages raise the caller's unread count again.
unsnooze_thread
ChatGPTClear the snooze on a thread for the caller.
unstar_message
ChatGPTRemove the star from one message for the caller. On a Google sign-in line, the star is also removed in Gmail.
unsubscribe_mailing_list
ChatGPTUnsubscribe the line that received one message from its mailing list. Pass the id of an email from the list (list_mailing_lists gives newestMessageId). CommSync tries the one-click request, then sends the unsubscribe email from the line, then answers the web page for a person to finish. The unsubscribe applies to the whole line, for every reader. Needs send authority on the line. Refuses a message with a caution strip or a spam verdict. A second call answers the current state and sends nothing. It never sends a STOP text.
update_agent
ChatGPTChange the setup of one agent. Pass only the fields to change; the others keep their value. A change to mode or instructions applies to the next reply of an active agent: in SUPERVISED or AUTO mode the agent sends by itself. Returns the full setup of the agent. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
update_agent_alert
ChatGPTChange one alert. Pass only what changes; the whole alert is checked again. The kinds: CRITICAL_GOAL_NOT_MET: a goal is not met in a conversation (goalId null means any critical goal). GOAL_RATE_BELOW: the met rate of a goal over the last windowConversations analyzed conversations (10 to 500) falls below thresholdPercent (1 to 99); give goalId too. FIELD_MATCHES: a captured detail matches fieldOperator and fieldValue; give fieldId too. The operators: EQUALS, NOT_EQUALS, CONTAINS, GREATER_THAN, LESS_THAN, IS_TRUE, IS_FALSE (the last two take no value). The parts of the other kinds are cleared. Read goal and field ids with get_agent_analysis. Set enabled to false to stop an alert and keep it. Returns the alert. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
update_agent_analysis_settings
ChatGPTChange the analysis settings of one agent. Pass only what changes. Analysis spends AI credits for each analyzed conversation; turning it on applies to conversations that end after now. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
update_agent_field
ChatGPTChange one field. Pass only what changes in patch; the key cannot change. The whole field is checked again. A change to anything the model reads (the name, the description, the scoring, the levels, the examples, the scope, the channels, the condition, the type, or the choices) moves the version on, so old results keep the version they ran on. A change of the weight, critical, sensitive, or enabled keeps the version. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
update_agent_goal
ChatGPTChange one goal. Pass only what changes in patch; the key cannot change. The whole goal is checked again. A change to anything the model reads (the name, the description, the scoring, the levels, the examples, the scope, the channels, the condition, the type, or the choices) moves the version on, so old results keep the version they ran on. A change of the weight, critical, sensitive, or enabled keeps the version. A member, or a credential limited to some lines, can reach only an agent whose every line it holds.
update_agent_line
ChatGPTSet what one agent handles on one of its lines, and what it never handles there. Pass only the fields to change. The router reads the task fields when the line has two or more agents; the agent reads the never-handles fields on every message. The line must already be attached (set_agent_lines). Returns the full setup of the agent. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
update_agent_test
ChatGPTChange one saved test. Pass only what changes: a part you leave out keeps its stored value. conversation, expectation, and mocks each replace the whole part, so read the test with list_agent_tests first and send the part back with your edits. Pass mocks: null to remove the stand-in results. The whole test is checked again. A change clears the last result, because the test has not run in its new shape. A member, or a credential limited to some lines, can change only an agent whose every line it holds.
update_ai_settings
ChatGPTChange the caller’s AI settings. Send only the fields to change; the fields are the same as in Settings → CommSync AI. The first switch of the inbox classifier from off to on also starts a backfill over past mail. The workspace spend cap is not here: only the owner changes it, in the app.
update_contact
ChatGPTRename a contact or change its notes. A rename also becomes the title of the contact’s conversations, in place of an AI title. A manager of a shared contact can rename it; only the owner can change its notes, and a notes change from anyone else is left out with no error.
update_identity_notes
ChatGPTUpdate the notes on an identity (channel-level note, not the contact note).
update_label
ChatGPTUpdate a label (name, color, AI management settings).
update_profile
ChatGPTUpdate the current user name.
update_webhook
ChatGPTUpdate an existing webhook endpoint. Pass only the fields you want to change. Setting status="active" on a disabled endpoint resets the consecutive-failure counter so deliveries resume.
upload_attachment
ChatGPTStore one file for a later send and return its id. Pass the id in attachmentIds of send_email, compose_email, forward_message, send_sms, or compose_sms (images only for a text), or on a draft. The same rules as an upload in the app: at most 25 MB per file, and no executable file types (.exe, .js, .sh, .jar, .dmg, .apk, and similar). The whole request body is limited to 25 MB, so the base64 text caps a file at about 18 MB in practice. A file that no send or draft claims within 24 hours is deleted.