Herramientas

Consulta las herramientas disponibles y sus parámetros. Cada una enlaza al endpoint que usa en la referencia del API.

El asistente envía el nombre de la herramienta y sus argumentos JSON. El servidor llama a la API con tu credencial.

Cada herramienta lleva anotaciones que tu cliente puede usar para decidir si pregunta primero:

EtiquetaSignificado
LecturaNo cambia nada.
EscrituraAgrega algo nuevo y no cambia nada de lo que existe.
DestructivaPuede cambiar o eliminar datos existentes, o enviar algo que no se puede deshacer, como un mensaje o una campaña.

Herramientas de conversaciones

Las herramientas de conversaciones terminan en _v2 y llaman a /v2/conversations. Reciben el id de la conversación tal como lo devuelve list_conversations_v2, nunca un teléfono.

  • Pausar pasa la conversación a tu equipo (supervised) y detiene una respuesta en curso. Reanudar la regresa al agente (automatic), que le contesta al contacto ahora, siguiendo la instruction opcional; en una conversación que ya es automática no cambia nada. Esperar la regresa sin contestar ahora: el agente lee la instruction cuando el contacto vuelva a escribir.
  • Cada acción recibe un requestId: de 8 a 128 caracteres, un UUID sirve. Usa uno nuevo para cada acción nueva y repite el mismo cuando reintentes esa acción, para que no se aplique dos veces.
  • Las acciones responden changed. Una acción cuyo resultado ya se cumple responde changed: false y no notifica a nadie.
  • expectedVersion en update_conversation_v2, set_conversation_tags_v2 y set_conversation_assignees_v2 rechaza el cambio con 412 VERSION_MISMATCH si la conversación cambió desde que la leíste.
  • Los resultados de búsqueda se guardan 15 minutos. Para leer la siguiente página, pasa nextPageToken como pageToken con los mismos argumentos.

Las herramientas sin _v2 (list_conversations, get_conversation, pause_conversation, resume_conversation, add_conversation_tags, search_workspace_conversations…) llaman a las rutas V1 y siguen disponibles.

265 of 265 tools

Workspaces 1

list_workspaces
Read
Lists the Platica workspaces this connection can access, with their id, name, role and available modules. Call it first when you don't know which workspace to use or when the user asks to switch workspaces: the `id` it returns is the value for the `workspace` argument of the other tools.

Docs 2

get_product_doc
Read
Reads an official Platica document by the id returned by search_product_docs. Returns clean content and its source. If nextOffset isn't null, call again with that offset to continue. It only accesses the documentation corpus, never other workspaces' private knowledge.
search_product_docs
Read
Searches Platica's official documentation (product, interface and API). Use it when the user asks how Platica works. It returns sources and excerpts; use get_product_doc with the id found to read full steps, requirements and exceptions. It doesn't operate the workspace or replace the other tools.

Agents 37

compare_agent_versions
Read
Compares two versions of the agent: the sections that differ, with the before and after of each.
connect_agent_escalation
Destructive
Connects an escalation from the library to an agent, or turns it on or off with `enabled`. It is published at once, as a new version over the published one. If the draft has unpublished changes it answers DRAFT_PENDING: then add the escalation in `assistance.escalations` with update_agent_draft and publish it with publish_agent_version. It does not turn assistance on: if `assistanceEnabled` is false, turn it on with `assistance.enabled` in the draft.
connect_agent_file
Write
Connects to an agent a file that already exists in the workspace. Requires Integraciones and being able to edit the agent. If it was already connected, nothing changes.
connect_agent_tool
Destructive
Connects a catalog tool to an agent so it can call it. It applies immediately, without publishing. If it was already connected nothing changes (or its state changes, if you send `state`).
copy_agent
Write
Creates a new agent from a version of this one (the published one if none is given). It is born published. It does not copy history, channels or tools. With includeFiles it connects the copy to the same files, in the same state (requires being able to edit this agent, or Integraciones). In that case the copy is born inactive: activate it with update_agent.
create_agent
Write
Creates an agent with its instructions. It is born published as version 1, with the default configuration for everything else (it answers every day at any hour; human assistance is off; `assistance` turns it on and connects escalations from the start). It has no channels: it serves no one until one is assigned.
create_linked_subagent
Write
Creates a new subagent (it starts published) and links it to the parent's draft, in a single step. It does NOT publish the parent.
delete_agent
Destructive
Permanently deletes an agent. Irreversible. If it has connected files, it disconnects them first; the files stay in the workspace and in the other agents.
disconnect_agent_escalation
Destructive
Disconnects an escalation from an agent and is published at once (DRAFT_PENDING if the draft has unpublished changes). The escalation stays in the library and in the other agents; open cases do not change.
disconnect_agent_file
Destructive
Disconnects a file from an agent (being able to edit it is enough). The file stays in the workspace and in the other agents; to delete it from all of them, use delete_file.
disconnect_agent_tool
Destructive
Disconnects a tool from an agent. It doesn't delete the tool from the catalog or the MCP server / API behind it; other agents keep it.
get_agent
Read
Gets an agent: status, owners, which version is the draft and which one is published, and whether the draft has unpublished changes. The configuration (instructions, assistance, schedule...) is in the draft.
get_agent_draft
Read
Gets the draft's full configuration (what is being edited, not what is in production).
get_agent_file_job
Read
Shows the progress of an upload of a file connected to the agent, until `terminal` is true. Being able to view the agent is enough.
get_agent_publication
Read
Gets which version is published (the one serving customers) and its latest publication.
get_agent_template_setup
Read
Shows the pending items of an agent installed from a template, checked against the agent as it is now: each with its `id`, kind (`variable`, `tool`, `channel` or `knowledge`), whether it is required and its state (`pending`, `done` or `skipped`). An item is done when Platica sees it in the agent. `setup` is null when the agent does not come from a template.
get_agent_version
Read
Gets a full version (configuration included). Versions never change.
list_agent_escalations
Read
Lists the escalations connected to an agent (those of its published version) and whether each one is active. With `assistanceEnabled: false` the agent does not escalate even if it has escalations.
list_agent_files
Read
Lists the files connected to an agent: each with its connection (active or paused) and the file.
list_agent_publications
Read
Lists the agent's history of publications and rollbacks, newest to oldest.
list_agent_tools
Read
Lists the tools connected to an agent and their state (`active` or `paused`). The agent only uses active connections.
list_agent_versions
Read
Lists the agent's version history, newest to oldest, with who made each one (the person's email, the API key or the agent) and where from (`app`, `api`, `mcp` or `assistant`).
list_agents
Read
Lists the workspace's agents, newest first: status, which version is published, which one is the draft, and whether it has unpublished changes.
list_available_agent_tools
Read
Lists the workspace catalog, marking which tools are already connected to this agent (`isConnected`) and in what state (`connectionState`). Useful for choosing what to connect.
publish_agent_version
Destructive
Puts a version of the agent into production: from the next message on, customers talk to that version. Without versionId it publishes the draft. Use it only when the person explicitly asks for it.
replace_agent_draft
Destructive
Replaces the draft's full configuration and creates a new version. It does NOT publish. To change one part use update_agent_draft.
restore_agent_version
Destructive
Restores an old version as the draft: creates a new version with that content. It does NOT publish: production stays the same. To put a version that was already published back into production, use rollback_agent_publication.
rollback_agent_publication
Destructive
Puts back into production a version that was published before. It doesn't touch the draft. If the version was never published, use publish_agent_version. Use it only when the person asks for it.
schedule_agent_file
Destructive
Schedules a file to be activated or paused in an agent on a date: `activateAt` activates it (for example, the day a promotion starts) and `pauseAt` pauses it (the day it ends). It only changes for this agent; the file and the other agents don't change. An omitted date keeps the existing one, `null` clears it and `clear: true` clears both. Dates are in UTC, in the future and at most 366 days ahead. Being able to edit the agent is enough. When the date arrives it applies on its own and the result is in `link.schedule.last` of list_agent_files: an activation fails if the file has no ready content or if whoever scheduled it can no longer edit the agent. To pause or activate right now, use set_agent_file_state.
set_agent_file_state
Destructive
Pauses or reactivates a file on an agent: while paused, the agent stops using it but the connection and the file are kept. Being able to edit the agent is enough.
set_agent_tool_state
Destructive
Pauses or reactivates a tool already connected to an agent: while paused, the agent stops using it but the connection is kept. Reactivating a tool that was not connected connects it.
update_agent
Destructive
Changes the agent's name or photo, whether it is active or inactive, or its owners (emails). It creates no version and applies immediately, without publishing: the new name and photo show everywhere at once. The configuration (instructions, assistance, schedule...) is edited in the draft, not here.
update_agent_draft
Destructive
Edits the agent's draft by section and creates a new version. It does NOT publish: production stays the same until you use publish_agent_version.
update_agent_template_setup
Destructive
Changes the list of pending items of an agent installed from a template. `skip` skips an optional item and `unskip` makes it pending again (both with `slotId`); `complete` closes the list once the required items are done and `dismiss` discards it. None of them changes or publishes the agent.
validate_agent_draft
Read
Checks some changes against the draft without saving anything: says whether they could be saved and whether they could then be published, with each problem.

Agent templates 2

install_agent_template
Write
Creates a new agent, as a draft, from a template of list_agent_templates, with its list of pending items: business details missing from its instructions, tools to connect, a channel and suggested knowledge. Returns the agent (`agent.id`, `agent.url`) and its pending items (`setup`). The agent serves no one until it is published. Each call creates another agent.
list_agent_templates
Read
Lists Platica's agent templates: agents ready to install, with their `slug`, name, what they are for, channels, tools and the pending items (`slots`) they leave once installed. To create an agent from one, use install_agent_template.

Evals 17

add_eval_scenario_version
Write
Saves a new version of a scenario. Previous versions don't change; suites that pinned a version keep using it. Editing a platform scenario creates a workspace copy.
archive_eval_scenario
Destructive
Archives a workspace scenario: all its versions become `archived` and no new run uses it. Past runs don't change and archiving it again returns it unchanged. Fails with EVAL_SCENARIO_IN_USE (`details.suiteIds`) if an unarchived suite has it: remove it from those suites with update_eval_suite or archive them first. A platform scenario can't be archived (EVAL_SCENARIO_READONLY).
cancel_agent_eval_run
Destructive
Asks to cancel a queued or in-progress launch. Trials that already finished are kept; the final status is shown by get_agent_eval_run. A launch that already finished (`completed` or `cancelled`) returns 409 `EVAL_CONFLICT` and stays as it was.
compare_agent_eval_runs
Read
Compares a suite's latest run across two to four versions of the agent, scenario by scenario, without counting errored trials. It warns if a version is missing a run, if the suite or the knowledge changed between runs, or if a run had errored trials (`errored_trials`).
create_eval_scenario
Write
Creates a workspace test scenario (version 1). It is active immediately and can be used in suites. To test that the agent asks a person for help, add the `assistance_requested` check with `expected: true`: it only passes if the tested version has human assistance enabled (estimate_agent_eval_run warns about it with `assistance_disabled`).
create_eval_suite
Write
Creates a suite: a group of workspace scenarios that can be run against any version of any agent. With `agentId` it becomes that agent's tests: changing or archiving it requires being able to edit the agent.
estimate_agent_eval_run
Read
Calculates, without running or writing anything, how many trials a suite would run against those versions and the maximum internal messages it would charge (`estimatedMaxMessages`: each agent turn is an internal message). `warnings` warns before running: `assistance_disabled` (`versionId`, `scenarioIds`) when that version has human assistance turned off and those scenarios ask for help (if it runs anyway, those trials fail with «La versión probada no tiene activada la asistencia.», that is, the tested version doesn't have assistance enabled), and `too_many_trials` (`limit`) when it exceeds the maximum trials per run. Use it before start_agent_eval_run and tell the person the messages, the warnings and that the test uses the agent's real tools. Read-only: being able to view the agent is enough.
get_agent_eval_on_publish
Read
Gets which suites run automatically after each publication of the agent. Read-only: being able to view the agent is enough.
get_agent_eval_run
Read
Gets an eval launch: status, progress, result per version and each trial with what passed or failed. Each run includes `outcome` (`passed`, `failed` or `inconclusive`; null until it finishes) and `erroredTrials`: a trial with `status` `error` or `cancelled` is an infrastructure failure, not the agent's, and doesn't count toward `pass1` or the result. `failed` if any valid trial failed; `inconclusive` if there were only errors. `passed` (true/false/null) is kept for compatibility. Each trial includes `endReason` (`script_end`, `customer_stop`, `max_turns`, `assistance_requested`, `cancelled` or `error`; null while it runs) and `assistanceAvailable` (whether the tested version had human assistance enabled).
get_agent_eval_trial
Read
Shows a trial's conversation, in `seq` order: the messages from the simulated person and from the agent (`message`), the real tools it called with what they returned (`tool_call`), agent changes (`handoff`) and when it asked a person for help (`assistance_request`: `source` `agent`, `guardrail` or `subagent`, `reason` and `waitingMessage`, what the customer received; the trial ends there with `endReason` `assistance_requested`). Each event includes its `eventId`. It also includes what was checked (`verdicts`), `endReason` and `assistanceAvailable`. The `runId` and `trialId` come in get_agent_eval_run.
list_agent_eval_runs
Read
Lists the agent's eval runs, newest to oldest: one per version, with its status and result (`outcome`, `erroredTrials`; see get_agent_eval_run).
list_eval_profiles
Read
Lists the platform's profiles (`profileId`, `version`, `title`): the kind of agent a scenario tests. A scenario without `profileId` uses `general`; one that doesn't exist is rejected.
list_eval_scenarios
Read
Lists the test scenarios the workspace can see (its own and the platform's), each in its newest version, archived ones included (`status`). A scenario is a test conversation with what is expected from the agent.
list_eval_suites
Read
Lists the workspace's suites, archived ones included: groups of scenarios that run together against a version of the agent. Each one comes with its `agentId` (null if it belongs to the workspace).
set_agent_eval_on_publish
Destructive
Chooses which suites run automatically after each publication of the agent (empty list: none). They never block publishing; each run uses the real tools and is charged as internal messages. Requires being able to edit the agent.
start_agent_eval_run
Destructive
Runs a suite (`suiteId`) or a single scenario (`scenarioId`, without running its group) against one to four versions of the agent (`draft`, `published` or `vN`). The agent uses its real tools and may ask a person for help if the version has human assistance enabled; in a test that notifies no one and records the escalation and its data without opening a real case. If keepReplying is true, the trial continues; if it pauses, it ends. Each turn is charged as an internal message: estimate first with estimate_agent_eval_run and run it only if the person asks for it after seeing the messages and the warnings. It responds immediately with the queued launch; progress is shown by get_agent_eval_run. `runs` may come back empty: the launch is already running and being charged, and its runs are read with get_agent_eval_run. Every call is a new launch and is charged: if you got no answer, check list_agent_eval_runs before launching again. It doesn't change or block publishing.
update_eval_suite
Destructive
Replaces a suite (name, scenarios, whether it is archived and, if you send them, the description and the agent). A suite with `agentId` requires being able to edit that agent (to move it, being able to edit both). Past runs don't change.

Chat 3

get_chat
Read
Gets an API chat by its canonical id, including its normalized history. Also accepts a `chat_*` conversationId as a compatibility fallback. Each message carries `role` (`user`, `assistant`, `tool` or `event`) and `direction` (`incoming` or `outgoing`); `messageCount` is the number of messages included in the response.
list_chats
Read
Lists only chats created through the Chat API. Use it to find the conversationId, client, primary agent and status before continuing or fetching a chat.
send_chat_message
Destructive
Talks to an agent as a client. Without conversationId it creates a chat and requires agentId; with conversationId it continues the chat and can change the primary agent. A closed chat is reopened automatically. Use delay or scheduleAt to schedule the run and get status scheduled immediately.

Files 8

create_file
Write
Creates a new file in the workspace: text, a web page or a base64 file (up to 1 MB). With agentId it is connected to that agent (being able to edit it is enough) and activates on its own as soon as it finishes processing; if it must stay paused, set it to `paused` with set_agent_file_state. Without agentId it requires the Integraciones permission. The title and description are optional: when missing, they are generated with AI from the content. With `refresh`, a web page is read again on its own every so often. It is processed in the background: it answers with `fileId` and `uploadId` to follow the progress with get_file_job.
delete_file
Destructive
Deletes a file from the workspace and removes it from every agent that uses it. Requires Integraciones and the `confirmationToken` from get_file with includeAffectedAgents: confirm the list of agents with the person first. To remove it from a single agent, use disconnect_agent_file.
get_file
Read
Gets a file. With includeContent it brings the processed text; with includeAffectedAgents, the agents that use it and the `confirmationToken` that delete_file asks for. Requires Integraciones or being able to edit every agent that uses it.
get_file_job
Read
Shows an upload's progress: queued, processing, ready or failed (with the reason). Use it after create_file or update_file until `terminal` is true. If the file belongs to an agent, get_agent_file_job only requires being able to view that agent.
list_files
Read
Lists the workspace's files, with their processing status and how many agents use them. Requires the Integraciones permission; the files of a single agent are listed with list_agent_files.
reprocess_file
Destructive
Processes a file again from its saved source: a web page is reread right now (use it when the page changed), and a file or text is processed again from the original. It also works to retry one that failed. It affects all the agents that use it, so it requires Integrations or being able to edit all those agents; while it is processed they keep using the previous version, and if the text comes out the same nothing changes (the job ends with `result: unchanged`). It responds with the `uploadId` to follow the progress with get_file_job. If a processing job is already in progress it fails with FILE_JOB_IN_PROGRESS; if there is no saved original, with SOURCE_UNAVAILABLE: replace the content with update_file.
suggest_file_metadata
Read
Proposes, with AI, a title and a description for a file from its processed content, without saving anything. Use it when the file has a provisional title or the person asks to autocomplete them: show them the proposal and, if they accept it, save it with update_file. Requires Integrations or being able to edit all the agents that use it. If the file doesn't have ready content yet, it fails with FILE_NOT_READY.
update_file
Destructive
Changes a file's title or description, replaces its content (with `type`) or sets a web page to stay up to date (`refresh`). It changes for all the agents that use it, so it requires Integrations or being able to edit all those agents. A replacement is processed in the background; meanwhile the agents keep using the previous content. `refresh` only applies to `url` files and can't be combined with a replacement: `{ intervalHours }` rereads it every so many hours and `null` turns it off; the result of the last read is in the file's `refresh`. To read the page right now, use reprocess_file.

Tools 49

bind_api_tool_secret
Destructive
Binds an existing secret to a credential slot of the tool. The slots and their state come in `secrets` of get_api_tool: `missing` and `needs_authorization` need binding. The secret is authorized only for the tool's current destination; editing the tool requires binding it again. The value never leaves the vault.
bind_function_secret
Destructive
Binds a workspace secret to a slot of the function (`API_KEY`, declared in `secretSlots`). The secret is authorized only for that slot's origin, and the code only sees a placeholder. Ids come from list_secrets; create one with create_secret. Binding another secret to the same slot replaces the previous one.
bind_mcp_server_secret
Destructive
Binds an existing secret to a credential slot of the MCP server. The slots and their state come in `secrets` of get_mcp_server: `missing` and `needs_authorization` need binding. The secret is authorized only for the server's current destination. The value never leaves the vault.
clone_api_tool
Write
Copies an API tool as a new draft. It does not copy the bound secrets or the test: they have to be bound and the copy tested before enabling it.
connect_mcp_server
Write
Saves the connection to an MCP server. Credentials never go inside: they are bound by slot with `secrets` or with bind_mcp_server_secret. If nothing is pending (a public server, or its secrets come in this call) it tests it right away, returns the tools it offers and installs the ones in `tools`. Installing a tool does not give it to any agent: use connect_agent_tool for that. The response carries `nextStep` with what is missing.
create_api_tool
Write
Creates a tool from an HTTP API. It starts as a draft and a name and description are enough: `request` can be completed later with update_api_tool. The schema the LLM sees is derived from the variables with mode "ai". Credentials never go inside the definition: each one is a slot (`auth.token`, `auth.password`, `auth.value`, `encryptPayload.key`, `header:<name>`, `variable:<name>`) that a secret is bound to with `secrets` or with bind_api_tool_secret. Order: create, bind secrets, a real test_api_tool and enable_api_tool. `request.url` must be public: localhost, a `.local` or `.internal` domain or a private IP returns 400 `INVALID_CONFIG` and nothing is saved. The response carries `nextStep` with what is missing.
create_database
Write
Connects a PostgreSQL or MySQL database so agents can query it read-only. Send `engine`, `host`, `database` and `user`, or a `connectionString`; the password goes in `password` or, if it is already in Secrets, in `passwordSecretId`. Recommend a read-only user. The connection starts enabled and publishes four tools for agents, with their ids in `tools`; it is not tested on its own: continue with test_database and then connect_agent_tool. A local or private host answers 400 `INVALID_CONFIG`, and a workspace holds up to 20 connections. Never repeat the password or the connection string in your answer. If the user prefers not to type them in the chat, they can connect the database in Platica (Integrations, Functions).
create_function
Write
Creates a custom function as a draft: TypeScript code that runs in Platica, isolated and without internet except for the domains you declare, and that an agent uses as the tool `fn_<name>`. Use it only when an API tool (create_api_tool) is not enough: SOAP or XML, several chained calls, unusual signatures or authentication, fixed calculations or transforming responses. For a single HTTP call with JSON, use create_api_tool. Format: `import { z } from "zod"; import { defineFunction } from "@platica/functions"; export default defineFunction({ input: z.object({...}), async run(input, { http, secrets, log }) { ... return {...}; } });`. The only network is `http.fetch(url, { method, headers, body })`, which answers `{ status, headers, text, json() }`, HTTPS only and only to `allowedDomains`. `secrets.X` is a placeholder Platica replaces with the value only in calls to that slot's origin: the code never sees the value. Allowed packages: `zod`, `@platica/functions`, `fast-xml-parser`, `date-fns`, `decimal.js`, `papaparse`, `lodash-es`. Forbidden: `fs`, `net`, `http`, `https`, `child_process`, `process`, `require`, `import()`, `eval`, `Function`, global `fetch`, `WebAssembly`, `globalThis`, `XMLHttpRequest`, `WebSocket`. Limits: 60 s per run (20 by default), 256 MB, 20 HTTP calls per run, 256 KB input and output, 100 KB of code and 20 functions per workspace. Continue with verify_function, test_function and publish_function. get_functions_runtime gives the template and the exact types.
delete_api_tool
Destructive
Permanently deletes the API tool and removes it from the catalog and from every agent.
delete_database
Destructive
Permanently deletes the connection, its four tools and the connections they had with agents. It does not touch the database. The secret with the password stays in Secrets; delete it with delete_secret if it is no longer needed.
delete_function
Destructive
Deletes the function for good, with its versions, its catalog tool and its agent connections. Its runs are kept for 30 days. The secrets stay in Secrets. To stop using it without losing it, use pause_function.
delete_mcp_server
Destructive
Removes the MCP server from the workspace along with all its tools and any connections they had to agents.
enable_api_tool
Destructive
Publishes the tool to the workspace catalog. Requires a successful real test of the current configuration (test_api_tool without dryRun) and every secret slot bound; if something is missing it answers 409 with the reason. It also fails if any variable visible to the LLM has no description. Returns the toolId for connect_agent_tool.
enable_database
Destructive
Turns a paused connection back on: the agents that have its tools see them again. Enabling one that is already enabled changes nothing.
enable_function
Destructive
Turns a paused function on again: the agents connected to it see it again. It needs a published version (otherwise `NOT_PUBLISHED`). Turning on one that is already on changes nothing.
get_api_tool
Read
Gets the full definition of an API tool, without credentials: HTTP request, variables and response configuration. Includes `secrets` with the state of each credential slot and `nextStep` with what is still missing to enable it.
get_database
Read
Gets a database connection: engine, host, database, user, SSL, hidden tables and columns, rows per page, time limit, `password.state` (`authorized`, `needs_authorization`, `bound` or `none`), `lastTest`, its agent tools in `tools` (the ids go in connect_agent_tool) and `nextStep` with what is missing. Never returns the password.
get_database_schema
Read
Reads the database schema live. Without `table`, every table with its type and approximate rows; with `table`, the columns of that table (type, nulls, primary key and references). Unlike the agents' tools, it also shows hidden tables and columns, marked with `hidden`: use it to decide what to hide. Use it before query_database to name tables and columns correctly.
get_function
Read
Gets a custom function with its code (`source`, the current draft), `allowedDomains`, `timeoutSeconds`, its secret slots and whether each has a secret bound (`secrets`), the last verification with its problems (`lastVerify.issues`), `liveVersion`, the `toolId` for connect_agent_tool when it is enabled, and `nextStep`. It never returns a secret's value.
get_functions_runtime
Read
The environment functions run in: allowed packages with their description (no version number), limits, the code template and the types of `@platica/functions` (`typesDts`). Read it before writing a function to use the exact signatures.
get_functions_usage
Read
The workspace's function usage against its limits: today's calls (of 5,000) and this month's (of 50,000), how many functions there are (of 20) and today's deploys (of 50). Past a limit, calls answer `LIMIT_REACHED` with `resetAt`.
get_mcp_server
Read
Gets an MCP server: the tools it offers and which are installed, the state of each credential slot in `secrets` and `nextStep` with what is missing.
get_workspace_tool
Read
Gets a catalog tool with its full parameter schema (the JSON Schema the LLM sees) and its origin.
list_api_tools
Read
Lists the workspace's custom API tools with their status (draft, enabled, paused). Only `enabled` ones exist in the catalog and can be connected to an agent.
list_databases
Read
Lists the databases connected to the workspace (PostgreSQL or MySQL, read-only) with their status (`enabled` or `paused`), the state of their password, their last test and the four tools each one publishes for agents. Never returns the password or the connection string.
list_function_runs
Read
Lists recent runs, newest first: of one function with `functionId`, or of all without it. Each carries `trigger` (`agent`, `manual` or `test`), `actor` (`user`, `api_key` or `agent`: the kind of who started it, without its id), version, `ok`, error code, duration, an excerpt of the input and output, logs and HTTP calls. For the next page send `pageToken` with the `nextPageToken` received.
list_function_versions
Read
Lists a function's published versions, newest first, with date, who published it and its notes, without the code. With `version`, that version with its code.
list_functions
Read
Lists the workspace's custom functions: TypeScript code that runs isolated in Platica and that agents use as the tool `fn_<name>`. Brings each one's status (`draft`, `enabled` or `paused`), published version, last verification and `nextStep`, plus the workspace's limits and usage.
list_mcp_servers
Read
Lists the MCP servers connected to the workspace, with their status and how many of their tools are installed. Credentials are never returned.
list_workspace_tools
Read
Lists the workspace's tool catalog: everything that can be connected to an agent, whether it comes from an MCP server, a custom API, a database or an installed app. Being in the catalog does NOT mean an agent uses it — that's what connect_agent_tool is for.
pause_api_tool
Destructive
Removes the tool from the catalog — no agent sees it — but keeps its settings so it can be enabled again.
pause_database
Destructive
Pauses a connection: no agent sees its tools, but the configuration and the connections with agents are kept so it can be turned on again with enable_database.
pause_function
Destructive
Pauses a function: no agent sees or can call it, but the code, the versions and the agent connections are kept to turn it on again with enable_function.
publish_function
Destructive
Publishes the draft: verifies it, deploys it as a new version that no longer changes, puts it live and leaves the function enabled in the workspace catalog. Connected agents use the new version from then on. The answer carries `version` and `toolId`, the id for connect_agent_tool. A failed verification answers 422 `VALIDATION_FAILED` with `issues`. It counts against the 50 deploys per day.
query_database
Read
Runs a query on the database and returns a page of rows as a table, with `nextCursor` when there are more. Only one SELECT statement is accepted: it runs in a read-only transaction, with the connection's time limit, and does not see hidden tables or columns; in a table with hidden columns, name the columns instead of using `*`. Use get_database_schema first to learn the tables and columns. For the next page send only the `cursor` that came in `nextCursor`.
rollback_function
Destructive
Puts an earlier published version live, at once. The draft does not change. Versions come from list_function_versions.
run_function
Destructive
Runs the published version by hand with `input`, as an agent would, and answers `ok`, `output` or `error`, `logs` and `httpCalls`. HTTP calls really go out. It counts against the workspace's call quota (60 per minute per function, 5,000 per day) and is recorded as a manual run. It is not general compute: use it to check a function, not to run jobs. Like test_function, it uses the bound secrets; one that is not bound answers `SECRET_MISSING`. A 409 `SECRET_AUTHORIZATION_REQUIRED` asks for the secret to be bound again. A 503 `OPERATION_UNCONFIRMED` says the run may have happened and counted: check list_function_runs before trying again.
start_mcp_server_oauth
Destructive
For an MCP server with OAuth: returns in `authorizeIn` the Platica page where a signed-in person completes the authorization, and whether it is already authorized. This tool neither receives nor returns tokens. After authorizing, test with test_mcp_server.
sync_mcp_server_tools
Destructive
Sets exactly which tools of the MCP server stay installed in the catalog: installs the ones on the list that are missing and uninstalls the ones that are not (they are disconnected from the agents that used them). Requires a connection verified with test_mcp_server. Names are the server's originals, as they come in `discoveredTools`.
test_api_tool
Destructive
Runs the tool with test values. With dryRun it assembles the request and returns it without calling the API; without dryRun it calls it for real. A successful real test is required by enable_api_tool and any later edit invalidates it. Credentials are shown masked in what was sent.
test_database
Destructive
Connects to the database with the saved configuration and lists the tables agents will see. `connected` says whether it worked; if not, `error` carries the code (`DB_AUTH_FAILED`, `DB_UNREACHABLE`, `DB_TIMEOUT`, `DB_SSL_CERTIFICATE`…) and what to check. The result becomes the connection's last test (`lastTest`). Test it after creating it and after every change to the connection or the password.
test_function
Destructive
Tests the draft for real: verifies it, deploys it apart from the published version and runs it once with `input`. HTTP calls really go out to the allowed domains. Answers `ok`, `output` or `error` (`FUNCTION_ERROR`, `TIMEOUT`, `EGRESS_DENIED`, `INPUT_INVALID`…), `logs`, `httpCalls` and `durationMs`. It counts against the day's calls and deploys. Bound secrets are resolved on Platica's side (their values never travel through the API); if the code reads a secret that is not bound it answers `SECRET_MISSING`: bind it with bind_function_secret. A 409 `SECRET_AUTHORIZATION_REQUIRED` asks for the secret to be bound again. A 503 `OPERATION_UNCONFIRMED` says the run may have happened and counted: check list_function_runs before trying again.
test_mcp_server
Destructive
Opens the connection to the MCP server, stores the tools it offers and records that it works. It is required before installing tools with sync_mcp_server_tools and has to be repeated after changing the connection or its secrets. It also re-discovers tools when the server has changed.
unbind_function_secret
Destructive
Unbinds the secret of a slot of the function (`API_KEY`). The slot stays declared and the secret stays in Secrets; only its permission for this function is withdrawn, so a test or run whose code reads that slot will answer `SECRET_MISSING` until another one is bound with bind_function_secret. It can be repeated: if no secret was bound, nothing changes.
DELETE /v1/tools/functions/{id}/secrets/{slot}
update_api_tool
Destructive
Partially updates an API tool; `request` is replaced whole when sent. Editing it invalidates the previous test and leaves bound secrets in `needs_authorization`: bind them again with `secrets` or bind_api_tool_secret and test again. If it was enabled it goes back to draft and leaves the catalog until it is enabled again. `request.url` must be public: localhost, a `.local` or `.internal` domain or a private IP returns 400 `INVALID_CONFIG` and nothing is saved. The response carries `nextStep`.
update_database
Destructive
Changes the fields you send on a connection; the lists of hidden tables and columns are replaced whole. Changing host, port or SSL authorizes the same password again for the new destination; if that is not possible, the response carries `passwordError` and `password.state` stays `needs_authorization`: send `password` or `passwordSecretId`. Changing engine, host, port, database, user or SSL clears the last test: test again with test_database. Changing `name` renames its tools and agents keep them. Never repeat the password or the connection string in your answer. The response includes `nextStep`.
update_function
Destructive
Changes the fields you send of a function's draft: code, description, domains, time limit or secret slots. Lists are replaced whole. The published version stays the same until publish_function. Changing `allowedDomains` or `secretSlots` asks for the secrets to be bound again: a secret is authorized for one destination. After changing the code, verify it with verify_function. The answer carries `nextStep`.
update_mcp_server
Destructive
Changes the name, URL, authentication or headers of an MCP server. Changing the connection invalidates the previous test, removes its tools from the catalog and leaves the secrets in `needs_authorization`: bind them again with `secrets`, test with test_mcp_server and choose the tools again.
verify_function
Destructive
Verifies the code without running it: size, syntax, types, allowed packages, security rules, bundling and the input schema the agent will see. `ok` says whether it passed; if not, each problem in `issues` carries `stage`, `line` and `message`: fix it and verify again. With `source` it verifies that code instead of the saved draft, without saving it. The result becomes the function's last verification.

Secrets 7

create_secret
Write
Stores a credential as a workspace secret and returns its id. Then bind it to the slot that needs it with bind_api_tool_secret or with `secrets` when creating or editing the tool. If the user prefers not to type the credential in the chat, they can create it in Platica (Integrations, Secrets) and here it is only bound using list_secrets.
delete_secret
Destructive
Deletes a secret and all its authorizations. The tools that used it stop working until another one is bound. Check `usedBy` with get_secret first.
get_secret
Read
Gets a secret's data and, in `usedBy`, the tools and slots where it is authorized. It does not return the value. A deleted secret returns 404.
list_secrets
Read
Lists the workspace's secrets: id, name, kind, status and expiry. It never returns values. Use it before creating one to reuse the one that already exists.
revoke_secret
Destructive
Revokes a secret: it stops working in every tool and webhook where it is authorized, and it can no longer be rotated or bound again. The record is kept with status `revoked`; to remove it use delete_secret. Check `usedBy` with get_secret first. A deleted secret returns 404.
rotate_secret
Destructive
Replaces a secret's value. Every tool that uses it picks up the new value without binding it again.
update_secret
Destructive
Changes a secret's name or expiration. It does not touch the value (rotate_secret is for that) or its authorizations. A deleted secret returns 404.

AI providers 5

connect_ai_provider
Destructive
Connects or replaces the workspace's own key for an AI provider and verifies it with one short generation per model, which spends a few tokens of the workspace's account (up to 10 verifications per hour per provider). The key is stored encrypted as a workspace secret, authorized for that provider only; replacing it revokes the previous one and deletes it from Secrets if this connection created it (if it was renamed or is used by another integration, it stays). Returns the provider with `status` and `models`; with `invalid`, `lastError` says why. If the user prefers not to type the key in the chat, they can connect it in Platica (Settings, Models).
disconnect_ai_provider
Destructive
Disconnects a provider's own key: it stops being used, its authorization is revoked and the secret the connection created is deleted from Secrets. If that secret was renamed or is used by another integration, it stays in Secrets (list_secrets). The models that run only with the workspace's own key become unavailable. Disconnecting a provider with no key changes nothing.
list_ai_providers
Read
Lists the AI providers the workspace can use with its own key (OpenAI, Google, Anthropic and xAI) and the state of each: `status` (`not_connected`, `verifying`, `connected`, `invalid` or `disabled`), `fallback`, `lastVerifiedAt`, `lastError`, the name of the secret that holds the key and, in `models`, which models the key runs (`available`, `unavailable` or `unverified`) and which work only with the workspace's own key (`ownKeyOnly`). It never returns the key. With a connected key, agents can add their own fallback models (`fallbackModels`).
update_ai_provider
Destructive
Changes the fallback of a provider with its own key, that is, what agents do while the key does not work. It does not touch the key. A provider with no key answers 404 `PROVIDER_NOT_FOUND`.
verify_ai_provider
Destructive
Verifies the provider's stored key again with one short generation per model (it spends a few tokens; up to 10 verifications per hour per provider) and returns the provider with `status` and `models` up to date. A provider with no key answers 404 `PROVIDER_NOT_FOUND`.

Channels 11

assign_channel_agent
Destructive
Assigns (or removes) the default agent that answers a channel's inbound messages, without touching the rest of the channel's settings. Pass defaultAgentId=null to unassign. It can also rename the channel. To disconnect it use disconnect_channel; to connect one, connect_channel.
cancel_channel_connection
Destructive
Cancels a channel connection that has not finished yet. Its links (`shareUrl` and `authorizeIn`) stop working. It does not touch channels that already exist.
connect_channel
Destructive
Creates a pending channel connection. It expires in 24 hours (or in `expiresInMinutes`, from 15 minutes to 7 days). Messenger, Instagram and Facebook or Instagram comments return `shareUrl`: a link you can send to whoever manages the page or the account, even if they have no Platica account; there they authorize with Meta and choose what to connect. `authorizeIn` is the same inside Platica, for a team member with access to Integrations. WhatsApp, domain email, Gmail and Outlook stay pending with `authorizeIn`, which opens their wizard in Platica; the connection becomes `connected` when that wizard creates the channel. Then check the connection with get_channel_connection until it says `connected`. To reconnect a channel, create another connection of the same type. Web chat and web pages are not connected here: they are created with create_webchat. Telegram, SMS and voice are not available yet.
delete_channel
Destructive
Removes a channel from this workspace and unassigns its agent: it no longer appears in list_channels and get_channel no longer finds it. If it is still connected, it also disconnects it. Email mailboxes are removed in Platica: it answers `MANAGE_IN_PLATICA` with the link in `manageUrl`. To use it again, connect it again with connect_channel.
disconnect_channel
Destructive
Disconnects a channel: it stops receiving and sending messages. On Meta it removes the subscription and the web chat is turned off. Email mailboxes (Gmail, Outlook or on your own domain) are managed in Platica: it answers `MANAGE_IN_PLATICA` with the link in `manageUrl`. It keeps the channel, its history and its agent. To connect it again, start a connection of the same type with connect_channel; a web chat that was turned off is turned on again with publish_webchat.
get_channel
Read
Gets a channel by its document id or its prefixedChannelId (e.g. wb-123, fbc-123, igc-123). Includes `health`: `state` (ok, needs_reconnection, action_required, paused or disconnected), `reason` and `since`.
get_channel_connection
Read
Checks a channel connection created with connect_channel: its status, the shareable link (`shareUrl`) or the wizard (`authorizeIn`) while it has not finished, what there is to choose and the channels that resulted. Call it when the person says they opened the link or finished the wizard. `nextStep` says what comes next.
list_channel_connections
Read
Lists the workspace's channel connections, newest first, with their status, their expiry and the shareable link (`shareUrl`) or the wizard (`authorizeIn`) of the ones still pending. `status: open` keeps only the ones waiting for someone.
list_channels
Read
Lists the workspace's communication channels (WhatsApp, Messenger, Instagram, email and Facebook or Instagram comments). Each row includes the platform, number, default agent, class (`kind`: messaging or comments) and health (`health`: whether it works and, if not, what it needs). On a comments channel (`fbc-` / `igc-`) it also shows the auto-reply: whether it is on, whether it is configured and its mode. On messaging channels those three columns are blank.
select_channel_assets
Destructive
Chooses which pages, accounts or numbers to connect when the connection is in `awaiting_selection`. Use the `platformId` from `availableAssets`. Those with `installedElsewhere` are already connected in another workspace. Then check the connection with get_channel_connection until it says `connected`.

Web chats 6

create_webchat
Write
Creates a web chat and leaves it published: a widget for your site (`mode` `embed`), a page hosted by Platica (`page`) or both (`both`, the default). Returns the snippet `embed.script` to paste in the site's HTML and, with `page` or `both`, the link `embed.pageUrl`. Give the snippet to the person as it is. The widget only loads on the domains in `allowedDomains`. Whatever you do not send in `config` takes Platica's defaults.
delete_webchat
Destructive
Deletes a web chat for good, with its configuration: the code pasted in sites and its page stop working. It cannot be undone. To only turn it off, use disconnect_channel.
get_webchat
Read
Gets a web chat: its configuration (`config`), whether it has unpublished changes, its health and how to install it. `embed.script` is the snippet to paste in the site's HTML, `embed.inline` shows it inside a container and `embed.pageUrl` is the Platica page. Give the snippet to the person as it is.
list_webchats
Read
Lists the workspace's web chats (a widget in your site, a Platica page or both): name, id, mode, agent, domains, whether it has unpublished changes and its health (`health`). For the installation code, use get_webchat.
publish_webchat
Destructive
Publishes the saved changes to `config`: the site and the Platica page show the new configuration. If the web chat was turned off (with disconnect_channel), publishing it turns it on again. Publishing without changes publishes the same again.
update_webchat
Destructive
Changes a web chat; only what you send. `name`, `agentId`, `mode` and `allowedDomains` apply at once. Changes to `config` stay saved but unpublished until publish_webchat. Changing `allowedDomains` also adjusts, in the draft, the rules for which pages it shows on (`config.behavior.displayRules`).

Conversations 27

add_conversation_tags
Write
Tags ONE conversation by its unique `id`, like the inbox's tag picker. The tags must exist in the workspace: one that does not answers `TAG_NOT_FOUND` with the list of the ones that do (it is not created). Safe to repeat: adding one it already has changes nothing. To tag the contact use `tag_clients`.
POST /v1/conversations/{conversationId}/tags
archive_conversation_v2
Destructive
Closes the conversation: the agent stops, its memory of this conversation is closed once and the status becomes `archived`. The history can still be read. With an open support case it answers `CASE_OPEN` with the cases (`caseIds`): close or decline them first.
bulk_conversation_action_v2
Destructive
Applies one action to an explicit list of up to 100 conversations: `assignees`, `tags`, `pause`, `finish` or `archive`. Each is handled on its own, with the same rules as the single action, and gets its own result: one that fails does not stop the others. `tags` and `assignees` say in `input.mode` whether they replace (`replace`) or add and remove (`patch`). The IDs come from list_conversations_v2 or search_conversations_v2; review the list before sending it.
count_conversations_v2
Read
Counts the conversations the credential can see, with the same filters as list_conversations_v2, grouped by `operation` (the default), `status`, `agent` or `channel`. Counts are exact and have no date window; only the groups you ask for are returned.
finish_conversation_v2
Destructive
Marks an active conversation as `finished` and stops a reply the agent is writing. The thread stays open: if the contact writes again, it continues in the same conversation. Finishing does not archive; to close it use archive_conversation_v2.
get_conversation
Read
Gets ONE conversation by its unique `id`, including the full history. For compatibility it also accepts the legacy `conversationId` argument (phone/identifier, may return several threads). For all of a client's conversations use `list_client_conversations`. Each message carries `role` (`user`, `assistant`, `tool` or `event`) and `direction` (`incoming` or `outgoing`); `messageCount` is the number of messages included in the response. For emails, `content` is the plain text and `email` carries subject, sender, recipients, HTML and attachments.
get_conversation_message_v2
Read
Gets one visible message by its `id`, the one list_conversation_messages_v2 returns. The provider's ID (WhatsApp, Meta) does not work here. A system event answers as a message that does not exist. Read it again to get fresh attachment URLs.
get_conversation_v2
Read
Gets one conversation by its `id`, without its history: messages are read with list_conversation_messages_v2. By default it brings the list fields plus `createdAt` and `cases`. A conversation out of your reach answers the same as one that does not exist.
list_conversation_messages_v2
Read
Lists the visible messages of a conversation, most recent first: only `user` (the contact) and `assistant` (the brand). System events and tool traces never show. `sender` says who wrote it (`contact`, `agent`, `member` or `brand`); with `include` `agents` and `members` their names come too. To continue, pass `nextPageToken` as `pageToken`.
list_conversations
Read
Lists the workspace's conversations grouped, with pagination and filters by channel, platform (for example `email` or `whatsapp`), client, primary agent, tags, date range and cases (by escalation, open or closed). Email conversations include `email` with subject and mailbox. Each result includes the unique `id` to use with get_conversation and update_conversation.
list_conversations_v2
Read
Lists the conversations of a workspace, most recent activity first, without their messages. Only the ones the credential can see. Each row carries the `id` that get_conversation_v2 and list_conversation_messages_v2 use. `status` is the visible state (`initiated`, `active`, `finished`, `archived` or `spam`) and `operation` who answers (`automatic`, `supervised` or `assistance`): a supervised conversation is still active. To continue, pass `nextPageToken` as `pageToken`; a page can come back empty with a token and the list goes on.
patch_conversation_assignees_v2
Destructive
Adds and removes assignees in one step, by ID or email, and optionally changes `assignedToTeam`. `add` and `remove` cannot repeat anyone. Adding someone already assigned changes nothing and does not notify them again.
patch_conversation_tags_v2
Destructive
Adds and removes tags of a conversation in one step. `add` takes tags that exist in the workspace; `remove` also takes an old one the conversation still has even if it no longer exists. `add` and `remove` cannot repeat a tag. Adding one it already has, or removing one it lacks, changes nothing.
pause_conversation
Destructive
Pauses the agent in ONE conversation by its unique `id`: the conversation moves to supervision (`operation: supervised`) and, if the agent is answering right now, that answer is cut off before it sends anything else. Whatever the client writes in the meantime stays in the history, and the agent does not answer until you resume it with `resume_conversation`. Safe to repeat: `changed` says whether this call changed the mode and `interrupted` whether it cut off an answer in progress.
pause_conversation_v2
Destructive
Hands the conversation to the team: `operation` becomes `supervised` and the agent stops answering, including a reply it is writing (`effects.interrupted`). The status does not change. Pausing an already supervised conversation changes nothing.
remove_conversation_tags
Destructive
Removes tags from ONE conversation by its unique `id`. Accepts the tag's name or id, and also one the conversation still carries after it was deleted from the workspace. Removing one it does not have changes nothing.
POST /v1/conversations/{conversationId}/tags
reopen_conversation_v2
Destructive
Makes a finished or archived conversation `active` again, supervised by the team. It never writes to the contact. An archived one reopens only if the channel reuses the thread (team chats, API chats, connected Gmail or Outlook email); on other channels it answers `THREAD_CLOSED` and the contact's next message opens another conversation.
resume_conversation
Destructive
Hands ONE paused conversation back to the agent (`operation: automatic`). On its own, the agent waits for the client's next message; with `reply: true` it answers whatever is pending right away, and with `instruction` it answers following that guidance. Only the call that changes the mode wakes the agent: repeating it never produces two answers. Errors: `CASE_OPEN` (it has open cases: resolve or decline them first), `NO_ACTIVE_AGENT`, `CONVERSATION_CLOSED` and `AGENT_STOPPING` (the paused answer has not finished stopping yet: try again in a few seconds).
resume_conversation_v2
Destructive
Hands the conversation back to the agent, which replies to the contact now following the instruction: `operation` becomes `automatic` and the agent starts a reply (starting does not confirm delivery). Without `instruction`, the agent continues where the conversation left off. Resuming an already automatic conversation changes nothing and starts no reply. To hand it back without replying now use wait_conversation_v2.
search_conversations_v2
Read
Searches conversations by words (`lexical`), by meaning (`semantic`) or both (`hybrid`, the default). With an empty `query` or `*` it explores by filters, newest first. Each result has the same shape as in list_conversations_v2, plus the signals you ask for in `fields`: `snippet` (the matching fragment), `score`, `sources` and `scores`. It only returns conversations the credential can see; a page can come back shorter than `limit`. To continue, pass `nextPageToken` as `pageToken` with the same arguments; results are kept for 15 minutes.
set_conversation_agent_v2
Destructive
Makes another active agent of the workspace the main agent of the conversation. It does not move the contact or copy memory. While the agent is answering it returns `CONVERSATION_BUSY`: retry in a few seconds or pause first. `effects.previousAgentId` is the previous agent.
set_conversation_assignees_v2
Destructive
Leaves exactly these team members as assignees, by ID or email; an empty list removes them all. The whole team goes apart, in `assignedToTeam`, never as `team` in the list. Only those added are notified, once. To add or remove without sending the whole list use patch_conversation_assignees_v2.
set_conversation_spam_v2
Destructive
With `spam: true` it marks the conversation as spam and `blockContact` is required: say whether the contact is blocked too. With `spam: false` it returns to the status it had and never unblocks the contact (who may be blocked for another reason). `effects.contact` says what happened to the contact. Blocking needs write permission on contacts.
set_conversation_tags_v2
Destructive
Leaves the conversation with exactly these tags; an empty list removes them all. Each tag must already exist in the workspace (list_tags): this never creates one. To add or remove some without sending the whole list use patch_conversation_tags_v2. `effects` says which were added (`added`) and which were removed (`removed`).
update_conversation
Destructive
Updates the owners (`owners`) and/or status (`status`) of ONE conversation by its unique `id`. The legacy `conversationId` argument is kept for compatibility and may affect several threads. If the API key can access several workspaces, specify `workspace`.
update_conversation_v2
Destructive
Changes the topic (`topic`) of a conversation, or the title (`title`) of a team chat (`platform: platica`), the only kind with a title. Status, mode, contact, channel and agent have their own tools. Answers the conversation as it ends up and `changed`: sending the values it already has changes nothing.
wait_conversation_v2
Destructive
Hands the conversation back to the agent with an instruction; the agent replies when the contact writes next. `operation` becomes `automatic`, nothing is sent now and the agent reads `instruction` on that next turn. Use it to leave the agent a note (an answer the team found, something promised) without writing to the contact yet.

Messages 7

cancel_scheduled_message
Destructive
Cancels a message pending delivery and returns its updated public resource.
get_scheduled_message
Read
Gets the status and public data of a scheduled message by its ID.
list_scheduled_messages
Read
Lists scheduled messages, filtered by status, type, campaign and date range. Use `nextPageToken` to continue a paginated list.
reschedule_scheduled_message
Destructive
Changes when a scheduled message will be sent. Provide exactly one of `scheduleTime` or `delay`.
send_email
Destructive
Sends an email from a connected mailbox of the workspace (Gmail, Outlook or a mailbox on your own domain). Without `conversationId` it starts a new thread: it needs `to` and `subject`, and the subject goes out as is. With `conversationId` (the conversation id of the thread) it replies in that thread; there `to`, `subject` and `agentId` are not used. Send `text`, `html` or both; if you send only one, the other is built from it. With `agentId` the agent answers when the contact replies; without it, the conversation is left to your team. Use `list_channels` to see the email channels (`em-…`). Example: `{ channelId: "em-ventas@empresa.com", to: "ana@cliente.com", subject: "Tu cotización", text: "Hola Ana, te comparto la cotización." }`.
send_message
Destructive
Sends a custom message within an existing conversation of the `channelId` channel. For email, `send_email` is better, as it can also open new threads; here an email channel only replies in a thread that already exists. On WhatsApp, Instagram or Facebook it requires an open service window; internal `platica` chats have no such restriction and accept text, image, video, file, audio and instruction (not interactive/email/template). Accepts the same `client`, `campaignId`, `delay` and `scheduleTime` pattern as `send_template_message`. It also supports instructions to the agent with `type: "instruction"` and `content: { text, mode }`: `mode: "wait"` leaves the conversation waiting for the client's next message, with the instruction stored as a system message; `mode: "resume"` resumes the agent so it continues the flow using the instruction as context.
send_template_message
Destructive
Sends a message based on an approved WhatsApp template to the client identified by `conversationId` (international phone number). Creates the conversation and/or client if they don't exist. It can be sent immediately, with `delay` (in ms, minimum 3000) or with `scheduleTime` (ISO 8601, read as Mexico time if it has no time zone). Use `list_whatsapp_templates` to find available templates and `get_whatsapp_template` to inspect parameters and an example payload.

WhatsApp templates 6

create_whatsapp_template
Write
Creates a WhatsApp template and submits it to Meta's review. It stays `PENDING` and cannot be sent until Meta approves it (`APPROVED`): check its status with get_whatsapp_template and send it with send_template_message. If Meta or Platica rejects it, the error carries the reason. It does not work in workspaces connected through MessageBird.
delete_whatsapp_template
Destructive
Deletes a WhatsApp template on Meta: all its languages, or only one with `language`. It cannot be undone, sends and campaigns that use it can no longer send it, and Meta may reject a new template with the same name for a while. It does not work in workspaces connected through MessageBird.
get_whatsapp_template
Read
Gets the full details of a specific template, along with an example payload for `send_template_message`. If the name exists in several languages, `language` picks the version; the answer lists the `languages` it has.
get_whatsapp_template_analytics
Read
Shows how a WhatsApp template version did: sent, delivered, read, clicks and cost, in total and per day (Meta's data, up to 90 days). The last 30 days by default; use `days`, or `start` and `end` together. Only for workspaces connected to Meta directly.
list_whatsapp_templates
Read
Lists the workspace's WhatsApp templates, including an `api_example` with a payload ready to use in `send_template_message`. Filter with `status`, `category` and `name`.
update_whatsapp_template
Destructive
Edits one language version of a WhatsApp template. The edit goes back to Meta's review and the template cannot be sent until Meta approves it again. Meta decides when and how many times a template can be edited; if it does not allow it, the error carries its message. Send `components`, `category` or both. It does not work in workspaces connected through MessageBird.

Posts and comments 11

get_comment_thread
Read
Gets a thread with all its comments (up to 500), its status and its private replies.
get_post
Read
Gets a comment post by its id.
list_comment_threads
Read
Lists a post's threads (a root comment and its replies). Accepts one filter at a time: status, needsReply, operation or owner.
list_posts
Read
Lists Instagram and Facebook posts that have comments, with open threads, threads in assistance and whether the agent is paused. Use the `id` with get_post and list_comment_threads.
moderate_comment
Destructive
Hides, shows, deletes or marks a comment as spam. delete is irreversible on Meta; spam also blocks the contact.
publish_comment
Destructive
Publishes a new brand comment on the post (it doesn't reply to anyone). It is public and immediate. Facebook also accepts an image by https URL.
reply_to_comment
Destructive
Replies publicly within a thread. Without parentCommentId it replies to the root comment. Not available while the thread is in assistance: the assistance has to be accepted first.
send_private_reply
Destructive
Sends a direct message to the commenter. Meta allows one per comment and only within 7 days. Without commentId it replies to the thread's root comment; publicNotice adds a public comment announcing the DM.
send_thread_to_agent
Destructive
Sends the agent whatever was left unanswered in a supervised thread (and sets it to automatic). dryRun=true only reports what it would send.
update_comment_thread
Destructive
Resolves or reopens a thread (status), pauses or resumes the agent on that thread only (operation; null = inherit from the post; supervised on a thread in assistance accepts it) and/or changes owners (owners, emails).
update_post
Destructive
Pauses (operation=supervised) or resumes (operation=automatic) the agent on a post, and/or assigns it its own agent (agentId; null = the page's agent). Resuming only applies to new comments.

Cases 7

accept_case
Destructive
Takes a case: it is assigned to whoever takes it. With an API key you must say who (`userId`); a person takes it for themselves. The conversation becomes supervised: a person handles it. This tool does not write to the contact: with `notifyCustomer` the answer says so and you send the notice through the conversation.
add_case_note
Write
Adds a note to the log of an open case.
close_case
Destructive
Closes a case as `resolved`, `discarded` or `unresolved` (the last two need a note). Closing as `discarded` is declining it. A closed one is not reopened. If it was the last open one and the conversation is supervised, `returnToAgent` hands it back to the agent, which replies again from the customer's next message.
get_case
Read
Gets a case with its log: who opened it, assignments, who took it, priority and field changes, notes and closing.
list_cases
Read
Lists cases, newest first. Filters by status, escalation, contact, conversation, comment thread, assignee or priority. For conversations with cases use list_conversations with escalationId or caseStatus.
open_case
Destructive
Opens a case of an escalation in a conversation. Data linked to contact fields is filled in by itself; if required data is still missing it answers `missing_fields` without opening anything. There is one open case per escalation per client: if the client already has one of that escalation, in this conversation or another, it answers `duplicate_open` with its `caseId` and `conversationId` (add a note to it). An escalation with `allowManual: false` answers `manual_not_allowed`: only the agent escalates with it.
update_case
Destructive
Changes the priority, the assignees (the list replaces the previous one), the data (merged; `null` removes one) or the summary of an open case.

Escalations 5

archive_escalation
Destructive
Archives an escalation: it can no longer be edited, no cases are opened with it by hand and agents no longer escalate with it. Open cases stay as they are. Repeating it changes nothing.
create_escalation
Write
Creates an escalation in the workspace library. First check list_escalations and reuse an escalation that already covers the situation. Only name, description and prefix are required. By default the agent keeps replying (`agent.keepReplying: true`), the case goes to the contact's owners, lives up to 14 days and can also be opened by hand (`allowManual`). If the escalation pauses the agent (`keepReplying: false`), `agent.waitMessage` is what it tells the contact. Data the contact already has in a custom field is linked with `customFieldId` (the id comes from list_custom_fields) so it is not asked again. Then connect it to an agent: connect_agent_escalation (publishes at once) or `assistance.escalations` with update_agent_draft and publish_agent_version.
get_escalation
Read
Gets an escalation: when to escalate, what data it asks for, priority, who handles it, what the agent does and how long its cases live.
list_escalations
Read
Lists the workspace's escalations: when to escalate, what data each one asks for, priority, who handles it and whether the agent keeps replying. They are a shared library: check it before creating an escalation and reuse the one that already covers the situation. Each agent connects the ones it may use (list_agent_escalations).
update_escalation
Destructive
Edits an escalation. It applies at once to every agent that uses it; cases already open do not change. Each section you send (fields, assignment, agent, lifecycle) replaces the whole previous one.

Contacts 14

add_client_note
Write
Adds a private team note to a contact, the same one written in the contact's panel in the inbox (the customer does not see it). It is signed by the person acting. Accepts the client's ID, phone number or email. For case notes use `add_case_note`.
POST /v1/clients/{identifier}/notes
block_client
Destructive
Blocks a contact: their future conversations start as spam, agents stop replying to them, and conversations that were already open are marked as spam so the block applies immediately. Accepts the client's ID, phone or email.
create_client
Destructive
Creates a new client with its phone, its email or both (at least one). If one already exists with the same phone, or with the same email and no other phone, it updates it (upsert). The email is stored in lowercase.
delete_client
Destructive
Deletes a client identified by its ID, phone number or email. The document is kept with its channel identifiers, but its personal data, tags and custom fields are cleared, and it no longer appears in listings. Its private notes and their attachments are permanently deleted. The contact's memory is invalidated when deleted and cleaned up in the background.
get_client
Read
Gets a client by its internal ID, phone number or email.
list_client_conversations
Read
Lists all of a client's conversations across all their channels and agents, including API chats. Accepts the client's internal id, phone or email. Each result includes the thread's unique id.
list_client_notes
Read
Lists the team's private notes about a contact, newest first, with author and date. Accepts the client's ID, phone number or email.
GET /v1/clients/{identifier}/notes
list_clients
Read
Lists the workspace's clients grouped, with pagination and optional filters (tags, status, date).
reset_client_strikes
Destructive
Resets the contact's moderation strikes to zero. With `clearHistory` it also deletes the record of the last offense. It doesn't unblock the contact: use `unblock_client` for that, which also resets the strikes. Use it to forgive a contact who hasn't been blocked yet.
search_clients
Write
Searches the workspace's contacts by text (name, phone or email) with filters for tags, WhatsApp status and one custom field. Returns one page and a `searchId` that keeps every result for 12 hours, to add them to a campaign (add_campaign_audience) or tag them (tag_clients) without copying the list.
tag_clients
Destructive
Adds tags to many contacts at once, by `clientIds` or by a search_clients `searchId`. The tags must exist in the workspace (create them with create_tag). Answers how many changed and which were not found.
unblock_client
Destructive
Unblocks a contact: returns to `finished` the conversations the block had marked as spam and resets their moderation strikes to zero, so a single further offense doesn't block them again right away. The record of the last offense is kept.
untag_clients
Destructive
Removes tags from many contacts at once, by `clientIds` or by a search_clients `searchId`.
update_client
Destructive
Updates a client identified by its ID, phone number or email. Only the fields provided are updated.

Custom fields 4

create_custom_field
Write
Creates a new custom field for contacts. For `type: select` you must send `options` (non-empty); the field's value on each client will be an option id.
delete_custom_field
Destructive
Deletes a custom field and clears its references on every client that has it assigned.
list_custom_fields
Read
Lists the workspace's custom fields, including the contact's default fields.
update_custom_field
Destructive
Updates a custom field's description and its `automatic`/`overwritable` flags. For `select` fields you can also edit `options` (full catalog replacement) and `ordered`; archive an option (`archived: true`) instead of deleting it to keep historical values. The type and name can't be edited; at least one field must be sent.

Tags 4

create_tag
Write
Creates a new tag. The name can't be changed once created; plan it carefully.
delete_tag
Destructive
Deletes a tag. Irreversible operation.
list_tags
Read
Lists the workspace's tags.
update_tag
Destructive
Updates an existing tag (criteria, automatic, owners). The name can't be changed.

Campaigns 18

add_campaign_audience
Destructive
Adds contacts to a campaign's audience from a single source: `clients` (phone and name), `searchId` (the full result of search_clients), `tag` (every contact with that tag) or `clientIds`. With `dryRun` it says how many would be added without adding any (not for `clients`).
clear_campaign_audience
Destructive
Empties the campaign's entire audience. Bulk and irreversible: it requires `confirm: true`, sent only after the person confirmed they want to empty it.
create_campaign
Write
Creates a new campaign. If `templateName` is included, the API validates the template and fills in the metadata automatically.
create_campaign_goal
Write
Creates a goal to measure the campaign: every conversation that meets the criterion counts. If the campaign already has one with the same name it does not create another: it returns that one with `alreadyExisted: true` (to change its criterion, `update_campaign_goal`).
delete_campaign
Destructive
Deletes a campaign.
export_run_recipients
Write
Exports to CSV, recipient by recipient, what happened in a run, and returns a `downloadUrl` that expires in one hour. It answers “who bought”, “who read and did not click” or “who did not receive it”, and lets you act on that list. Works with the run in delivering, completed, failed or cancelled; in sending or scheduled the list still changes (use `get_campaign_funnel`). The URL carries real customers' phone numbers: use it in the interpreter and do NOT paste it in the chat. Read `warnings` before using the file. Columns: `phoneNumber`, `name`, `tags` (empty, for you) and the analysis ones, which start with `funnel` (`funnelIsSent`, `funnelIsDelivered`, `funnelIsRead`, `funnelIsClicked`, `funnelIsPurchasedByLink`, `funnelHasEstimatedPurchase`, `funnelIsReplied`, `funnelIsFailed` are 0 or 1; `funnelHoursSinceSent` is for “72 hours later”). For “who did not buy” exclude both purchase columns. When reimporting a segment, pass this response's `columnMapping` as is.
get_campaign
Read
Gets a campaign by its ID, with the selected template (name, Meta status and components), the button's destination (CTA) and the templates the campaign sent to review.
get_campaign_audience
Read
Lists the members of a campaign's audience, paginated.
get_campaign_funnel
Read
Funnel per run (each send): Sent → Delivered → Read → Click → Purchase, with unique people at each step, the rates and the attributed money. Answers “how is my campaign doing?”. Without `runId` it returns the latest runs with their summary; that is where the `runId` for `export_run_recipients` comes from. • `funnel.*Unique`: distinct people per step; nothing is inferred (a click without a read receipt does not count as read). • `money.ordersLinked` / `revenueLinkedCents`: attributed purchases (token or contact + prior click). Amounts in CENTS. • `money.ordersMatched` / `revenueMatchedCents`: purchases matched by phone or email without a prior click; it is an ESTIMATE, present it as such and never add it to the previous one. • `intensity` and `reconciledAt` are null while the run is still in flight.
get_campaign_report
Read
Campaign report for a date range: global metrics (`transactions`, `conversations`, `conversionRate`), the daily message series (`chartData`) and each goal's completion (`goals` with count, percentage and totalConversations). Without dates, the current month. For the per-send funnel (delivered, read, clicks, purchases) use `get_campaign_funnel`.
list_campaign_goals
Read
Lists the campaign's goals: what is measured in its conversations (id, name and criterion).
list_campaigns
Read
Lists the workspace's campaigns, paginated.
preview_campaign_send
Read
Shows what would be sent, without sending anything or touching the campaign: to how many, from which number, how the message looks with the variables resolved on real contacts, what it costs and who replies. Returns a `confirmation`, which is the ONLY thing that authorizes `send_campaign`: it lasts 30 minutes and one send. Always before sending: show the result to the person and wait for their OK. Decide `replyHandling`, `senderChannelId` (if it is not from the template's WABA, the error says which ones work) and `variables` with them. The template, its buttons and the tracked link's destination come from the campaign (`update_campaign` with `ctaTargetUrl`); they are not sent here. Check `variables_sin_resolver`, `avisos` and `requiere_autorizacion`: if there is anything, say it. With `requiere_autorizacion: true` the send exceeds 5,000 messages and a person launches it from the dashboard; no `confirmation` comes back.
remove_campaign_audience
Destructive
Removes contacts from a campaign's audience by `searchId` (a search_clients result), `clientIds` or `phoneNumbers`. Does not delete the contacts from the workspace.
remove_campaign_audience_client
Destructive
Removes a specific client (by phone number) from the campaign's audience.
send_campaign
Destructive
Starts or schedules the campaign send. It spends money and writes to real customers: there is no undo. Requires the `confirmation` from `preview_campaign_send` and the other arguments IDENTICAL to that preview's. If anything changed since (audience, template, destination), it does not send and says what changed: preview again and show it to the person. Each `confirmation` works ONCE. Do not call it without the person's yes to what the preview showed. From here fewer than 5,000 messages per campaign can go out every 24 hours, counting sends and scheduled dates; splitting the audience or spreading it over dates does not get around it. It returns as soon as the send is queued, with a `runId`; the messages go out afterwards. Do NOT call it again to check or if it is slow: that would send the campaign twice. Progress is in `get_campaign_funnel`.
update_campaign
Destructive
Updates a campaign's editable fields.
update_campaign_goal
Destructive
Changes the name or criterion of a campaign goal. The `goalId` comes from `list_campaign_goals`.

Webhooks 8

bind_webhook_secret
Destructive
Binds an existing secret to a webhook slot: `webhook.secret` to sign deliveries or `header:<name>` for a header's value. The slots and their status are in `secrets` from get_webhook. The secret is authorized only for the webhook's current destination; changing the `url` requires binding it again. The value never leaves the vault.
create_webhook
Write
Registers a webhook that will receive the selected events. Before activating it, the destination is verified to respond; if it does not pass, the webhook is saved inactive and `activation.reason` says why (fix the destination and use test_webhook). The signing `secret` is stored as a workspace secret and no tool returns it. It is accepted only with a public https `url` (not localhost, a private IP or a #fragment); otherwise it returns 400 `SECRET_DESTINATION_INVALID` and nothing is saved.
delete_webhook
Destructive
Deletes a webhook by its ID.
get_webhook
Read
Gets a webhook by its ID: destination, events, whether it is active, the state of its credentials in `secrets` and `nextStep` with what is missing for it to deliver. It never returns the signing secret.
list_webhook_events
Read
Returns the full catalog of allowed webhook events, grouped by category (conversation, message, comment, client, ads, whatsappFlow).
list_webhooks
Read
Lists the workspace's configured webhooks, with their status. It never returns the signing secret or the value of headers that carry credentials.
test_webhook
Destructive
Verifies again that the webhook's destination responds and, if it passes, activates it. Use it after fixing a destination that did not pass verification when the webhook was created or edited.
update_webhook
Destructive
Updates a webhook; only the provided fields change. `active` pauses or reactivates it. If the destination (`url`) changes, its credentials have to be sent again (`secret`, `headers` or `secrets`), and an active webhook is verified again before it keeps delivering. A `secret` is accepted only with a public https `url` (not localhost, a private IP or a #fragment); otherwise it returns 400 `SECRET_DESTINATION_INVALID` and nothing changes.

Usage 5

get_usage_actors
Read
Message consumption by actor: automatic agents, workspace users and contacts. Useful to see where consumption comes from.
get_usage_conversations
Read
Conversation and autonomy metrics, broken down by platform, agent, channel or tag.
get_usage_messages
Read
Daily series and totals of messages used, groupable by type (service, manual service, comment replies, campaign), channel, template category, campaign, status or country. By default it answers exactly from transactions (mode=full); use mode=fast to read daily aggregates, faster on long ranges.
get_usage_period
Read
Returns the workspace's active billing period: billing type, plan and included credits.
get_usage_summary
Read
Monitoring summary for the workspace: messages used (service vs campaign), credits, conversations and autonomy rate. Uses the current billing period by default.