AGENT SKILL

chatbase

Use when managing Chatbase agents, sources, conversations, or help-desk tickets through the Chatbase MCP server

License 许可
MIT
最近更新
2026-11-12
Stars
★ 0
Forks
0

01 前言 Front Matter

name
chatbase
description
Use when managing Chatbase agents, sources, conversations, or help-desk tickets through the Chatbase MCP server

02 资源文件 1

03 SKILL.md 正文

Chatbase MCP

Judgment the tool schemas can't express. Read this before calling any tool below.

Resolve agentId — never guess it

agentId is an opaque id, not the agent's display name. Call chatbase_list_agents first, match the target by name, and use the id it returns. Never construct, infer, or reuse an id from memory or from another agent's id.

Sources train on write — there is no train step

  • Creating, updating or deleting a source takes effect on the agent's knowledge immediately. There is no separate training step and no tool to trigger one: the work starts the moment you write.
  • A new source comes back untrained and flips to trained once it is live, or failed if it did not land. An edited source shows updated until it is live again. Call chatbase_get_source to follow one, or chatbase_get_agent for the agent-level status. Do not report a source as live because the write succeeded — the write only means the work started.
  • Deleting a source is immediate and permanent. The knowledge is purged straight away; the source comes back deleted, or toBeDeleted while the purge finishes. Nothing restores it — there is no undo and no recovery tool. Confirm with the user before every chatbase_delete_source, and say plainly that it cannot be undone. Re-creating the source afterwards is a new source that has to train again from scratch.
  • Editing a source overwrites its content and retrains it on the spot, so the previous text and everything learned from it are gone. Treat chatbase_update_source as destructive too: confirm before overwriting content the user may not have a copy of.

Conversations: find with chatbase_search_conversations, read with chatbase_export_conversations

  • These are the only source-complete conversation tools on this server. There is no listConversations, getConversation, or listConversationMessages tool — they were deliberately left out because those API operations silently return API-source conversations only, making widget and WhatsApp conversations invisible. Never conclude "no conversations exist" from anything else.
  • Use chatbase_search_conversations to find conversations by what was said (query) or by what happened: escalated, actionType, tool / toolOutcome, procedure / procedureOutcome, feedback, sentiment, topic, dates. It returns ids, titles and a matching snippet, never full messages. Read the ones that matter with chatbase_export_conversations and conversationId.
  • To try several terms or filter combinations, put them all in one call's searches array (up to 5) instead of searching once per turn.
  • Search only covers conversations created since the 1st of the month 12 months ago. For older conversations, or to count every conversation an agent has, use export — an empty search over an older window proves nothing.
  • To limit a search to a period, filter on last activity with updatedAfter / updatedBefore.
  • A search page can come back empty while hasMore is true — keep following pagination.cursor until hasMore is false before concluding nothing matched.
  • A snippet is one excerpt, not the conversation. Do not answer "what happened" from snippets alone.
  • CONVERSATION_SEARCH_UNAVAILABLE means the account is HIPAA-enabled or the agent redacts its data. Drop query and search by filters, or use export.
  • include defaults to summary (message bodies omitted). Only switch to include: 'messages' for a conversation you've already picked out for full reading, one conversationId per call, several calls together — not as the first pass over a page. A page of full transcripts can be too large for the client to read.
  • Bulk analysis over many conversations is MCP work. Do it well:
    • Stay in include: 'summary' for the sweep — it omits message bodies and is the cheap mode.
    • Page with pagination.cursor until hasMore is false, aggregating findings as you go rather than accumulating raw pages in context.
    • chatbase_export_conversations returns at most 20 conversations per call, so a large sweep is many sequential calls. Before starting a long one, tell the user roughly how many pages to expect, and report partial findings as you go rather than going silent until the end.
    • Only escalate a specific conversation to include: 'messages' once the summary shows it matters.
    • The general pagination-discipline rule below ("read one page and stop unless asked") still governs exploratory reads — an explicit bulk-analysis request is the case where paging through everything is the correct behaviour.

chatbase_chat writes to the customer's live data

chatbase_chat is not a test harness. Every call starts or continues a real conversation on a real agent: it consumes the account's credits, and the exchange appears in the customer's conversation logs alongside genuine end-user traffic, where it can distort what their analytics and exports show.

  • Never call it to check that the connection works or that an agent exists. Use chatbase_whoami for connectivity and chatbase_get_agent to confirm an agent.
  • Call it when the user has actually asked you to talk to an agent, and say which agent you are messaging before you do.
  • Pass conversationId to continue a thread. Omitting it starts a new conversation every time, so a multi-turn exchange without it leaves a trail of one-message conversations in their logs.
  • Streaming is not available here; the full reply always arrives in one response.

The reply may contain tool-call and tool-result parts from actions the agent ran, carrying internal identifiers — toolCallId, and widget state.id / actionId. Read them if they help you answer, but summarise what the agent did in plain language. Do not quote those ids back to the user, and never write them into a ticket reply or a file.

chatbase_update_conversation sets a conversation's status to ongoing, paused or ended. Pausing or ending stops the agent replying to a real person who may be mid-conversation, and on conversation-billing accounts an ended conversation cannot be resumed (CONVERSATION_BILLING_NOT_SUPPORTED). Confirm with the user before pausing or ending, and say which conversation you are changing.

chatbase_update_agent replaces lists whole

Only the fields you send change, but list fields (initialMessages, suggestedMessages, allowedDomains, blockedCountries) and the whole channelInstructions record are replaced, not merged. Read the current value with chatbase_get_agent, change it, and send the full result. channelInstructions needs every channel key (chat_widget, help_page, center_stage, side_panel, slack, whatsapp, messenger, instagram, salesforce, zendesk, zendesk_messaging, api, email, android_sdk, ios_sdk, phone, search): keep stored overrides and send {} for a channel with none. An override is the instruction string, or {"chat": "...", "voice": "..."}; no other fields. An empty string is an empty override, not "use the main instructions". Show the user the before and after of any instruction or setting change, and re-read with chatbase_get_agent afterwards: the write only returns success.

Pagination discipline

  • Read one page, report what's in it, and stop. Never loop pages to "get everything" unless the user asked for that.
  • pagination.hasMore: true is the primary "more exists" signal — every paginated response carries it, so check it first. It means more items exist; say so explicitly rather than presenting a page as the complete list.
  • truncated: true is a rarer backstop that only appears when a tool's own cap silently cut a page short (it can't fire when the request already asked for at most the cap). Treat it the same way as hasMore: true when you do see it.
  • On chatbase_search_tickets, hasMore: true with a null cursor means there's no page to fetch — narrow the query instead of looking for a way to page.

When a result is not the whole answer

Several tools return something that is only meaningful once you fetch the rest, or resolve an id. Finish the job rather than handing the user a fragment.

  • A cursor is an instruction, not decoration. pagination.cursor with hasMore: true means the answer you have is partial. If the user asked a question the page cannot answer — "how many", "which one", "any that…" — keep paging with that cursor until hasMore is false before answering. If you stop early, say how much you read: "the newest 25 of at least 60".
  • Never answer a counting or superlative question from one page. "Which agent has the most sources", "how many tickets are open", "the oldest conversation" — all require the full set. One page gives you the top of a list, not a maximum.
  • Ids are not answers. A result carrying agentId, sourceId, statusId, authorId or conversationId and no name is not yet usable by a person. Resolve it — chatbase_get_agent, chatbase_get_source, chatbase_list_ticket_statuses, chatbase_list_helpdesk_teams — and report the name, keeping the id only if the user needs it to act.
  • A summary is a filter, not a reading. chatbase_export_conversations in its default summary mode omits message bodies. Answering "what did people ask about" from summaries alone is guessing; use the summaries to choose which conversations matter, then re-read those few with include: 'messages'.
  • A ticket without its messages is half a ticket. chatbase_list_tickets returns records only. Set includeMessages: true whenever the answer depends on what was said — reading a ticket's content, a general question about tickets ("what are customers complaining about", "any refund issues this week"), or a summary of one or more tickets — and leave it off for triage and counts. Each ticket then carries messages: its first 25 replies and notes, oldest first; add messageTypes: "reply,note,event" only when status or assignment history matters. messages.pagination.hasMore: true means the thread is longer — continue it with chatbase_list_ticket_messages, passing messages.pagination.cursor and your messageTypes as types. For one ticket by number, read chatbase_get_ticket and chatbase_list_ticket_messages.
  • A write result is a receipt, not a state. {"success": true} confirms the call was accepted, not what the record now looks like. When the user needs to see the outcome, re-read it — chatbase_get_ticket, chatbase_get_agent, chatbase_get_source — and report actual state.
  • chatbase_get_sources_summary is counts, not content. Use it to see how much a knowledge base holds; use chatbase_list_sources when the user needs to know what is in it.

Chain the calls yourself. Asking the user to run a second query you could have run is the failure this section exists to prevent.

Confirm before destructive tools

Ask the user before calling any of:

  • chatbase_delete_agent
  • chatbase_delete_source — the purge is immediate and there is no way back.
  • chatbase_delete_conversation — the conversation disappears from chat logs and the API, and no tool restores it.
  • chatbase_delete_action — no tool restores it. When procedures mention it, ask again before editing them to remove the mention.
  • chatbase_delete_procedure — its run history goes with it, and no tool restores either.
  • chatbase_update_source — a content change overwrites the source and retrains it at once, discarding the previous text and its embeddings. It does not "delete" anything by name, which is exactly why it is easy to under-estimate.
  • chatbase_update_action with fields and chatbase_update_procedure with steps — each replaces the whole list, so fields or steps left out are gone.
  • chatbase_update_conversation with status: 'ended' — on conversation-billing accounts the conversation is billed and cannot be resumed.
  • chatbase_create_ticket_message with type: 'reply' — every reply reaches the customer and can't be taken back. Get approval for each reply; never send several under one approval. A note stays internal to the team.
  • chatbase_update_ticket to a closed status — closing can email the customer a satisfaction survey and run help-desk triggers.

Error-code playbook

  • RATE_LIMIT_TOO_MANY_REQUESTS — back off and honour any retry-after; never retry in a tight loop.
  • SUBSCRIPTION_API_RESTRICTED_PLAN — stop and tell the user which plan the operation requires.
  • AGENT_NOT_FOUND and a plain 403 are both tenant-scoping failures — the id isn't wrong, it isn't yours. Do not retry with a different guessed id; re-resolve via chatbase_list_agents.
  • CHAT_CONVERSATION_NOT_ONGOING — the conversation ended; start a new one instead of retrying the same conversationId.
  • SOURCE_PENDING_DELETION — the source is mid-purge and cannot be edited. It is not recoverable: create a new source instead of waiting for it to come back.
  • SOURCE_IS_TRAINING — a training run owns the source right now, so the edit would be overwritten by the run's own write. Wait and retry the edit; deleting is still allowed.
  • CONVERSATION_NOT_TAKEN_OVER — the ticket's customer is still talking to the agent on that channel. The user takes the conversation over in the Chatbase dashboard first; this server can't. Don't retry until they have.
  • 5xx from chatbase_update_ticket — do not assume the update was rejected. Fields are validated together but written independently, so some may have applied. Re-read with chatbase_get_ticket and report actual state before retrying; never retry the whole payload blind.

Ticket attachments

chatbase_list_ticket_messages and chatbase_list_tickets with includeMessages return attachments as {name, url, type, size}. The file is fetchable — retrieve it yourself instead of telling the user to go to the dashboard or CLI.

  • Fetch url with a plain HTTP GET and no Authorization header. The route is unauthenticated by design — the token embedded in the URL path is itself the credential. Do not add one: the route ignores it, so it does not fail loudly — it just means you transmitted your OAuth access token to a route that never needed it, and on to the storage host it redirects to.
  • The request 302-redirects to a short-lived (120s) signed URL. Follow the redirect and read the body in the same request; do not save the redirect target to fetch later, since it will have expired.
  • The token URL itself does not expire. Treat it as a durable secret, not a throwaway link: fetch it only when you need the content, never repeat it back in your own output, and never write it into a file or a ticket reply.
  • name, type, and size may be null; don't assume a filename or MIME type exists before using one.
  • attachments is always an empty array on event messages — don't expect files there.
  • After chatbase_create_ticket_message succeeds, tell the user the reply was recorded, not delivered — and re-read with chatbase_get_ticket rather than assume its status is unchanged.

Chatbase tickets, not third-party tickets

Every chatbase_*_ticket* tool operates on Chatbase's own help desk only. Chatbase can integrate with third-party ticketing platforms (Zendesk, Intercom, etc.), but neither this MCP server nor the CLI can read or write tickets in them. Never present a Chatbase helpdesk result as if it covers a customer's third-party platform, and if the user asks about one, say plainly that it isn't reachable from here.

Events: subscribe instead of polling

If events/list is available, the server can notify a webhook you control when something happens, so you don't have to poll. Subscribe with events/subscribe: the event name, arguments with the agentId, and delivery with mode: "webhook", an https url and a secret you generate (whsec_ followed by 24 to 64 random bytes, base64-encoded). The server first POSTs a signed challenge to the URL, which must echo it back.

  • Deliveries are signed (Standard Webhooks) and carry only ids. Fetch the record with the tool named in the event's description, and never act on the payload alone.
  • A subscription expires at the refreshBefore the server returns, at most 24 hours out. Call events/subscribe again with the same arguments before then to renew it. Send ttlMs: null to ask for no expiry: the response then has refreshBefore: null and the subscription lasts until the connection is revoked or expires.
  • Delivery is at least once and can arrive out of order, so dedupe on eventId.
  • If you subscribe to both chatbase.ticket.created and chatbase.conversation.escalated, a ticket created by the AI agent handing a conversation over arrives only as chatbase.conversation.escalated, which carries the ticketNumber.
  • Conversations from the Playground and previews never send events.
  • Revoking the connection ends its subscriptions.

When a tool seems missing

Call chatbase_whoami first. Every tool is always listed; a call refused for permissions means the OAuth grant lacks that scope, not that the capability is absent.

Capabilities that live in the CLI, permanently

Absence from this tool surface is not absence of the capability — point the user at the CLI. These are permanent CLI-only capabilities:

  • File-source upload — chatbase sources create --file <path> -a <agentId> / chatbase sources update <sourceId> --file <path>. A remote MCP server has no filesystem to read from.
  • updateAgentStyles — chatbase agents styles <agentId> --data '<json>'.
  • WhatsApp template send — chatbase whatsapp send-template <name> --to <phone> -a <agentId> — sends a real message with no delivery confirmation, so keep it at a human's terminal.
  • WhatsApp template list — chatbase whatsapp templates -a <agentId> is CLI-only alongside the send operation.

The API is the final validation authority

The schema catches shape and cross-field rules before a request is ever sent — for example, chatbase_update_ticket rejects giving both statusId and statusCategory, and chatbase_create_ticket_message rejects giving neither, or both, of authorId / authorEmail. A schema rejection names the rule directly.

The API catches what no schema can express:

  • Whether a referenced id actually exists and belongs to this account — a well-formed statusId, agentId, or sourceId can still be rejected as not found. That's tenant scoping, not a malformed argument.
  • Plan and quota limits (SUBSCRIPTION_API_RESTRICTED_PLAN, rate limits, credit limits).
  • State-dependent rules — a conversation that has ended (CHAT_CONVERSATION_NOT_ONGOING), a source being purged (SOURCE_PENDING_DELETION) or mid-training (SOURCE_IS_TRAINING).

Treat any rejection as a real constraint to satisfy, not a transient failure to retry unchanged: if the schema rejected the call, its message names the rule to fix; if the API rejected it, re-check the ids and the account's state rather than the argument shape.

04 同仓库更多 Skills

Chatbase-co
Chatbase-co/chatbase-plugin

chatbase-teach-agent

Teach a Chatbase agent new or changed facts from the chat, a file, or a document the assistant can open — drafts Q&A and text sources, adds them after approval, and checks the bot uses them. Use for "we now close at 6pm", "train it on this PDF", "add our new pricing". Not for fixing answers found in conversations (use chatbase-fix-answers) or changing tone (use chatbase-edit-agent).

★ 0
Chatbase-co
Chatbase-co/chatbase-plugin

chatbase-multi-agent

Compare Chatbase agents or apply one change to several — diff staging against prod, copy settings from one agent to another, add the same rule or Q&A to many agents. For agencies and teams with several bots. Use for "what's different between staging and prod", "copy staging to prod", "add this rule to all my bots".

★ 0
Chatbase-co
Chatbase-co/chatbase-plugin

chatbase-helpdesk

Work the Chatbase help desk — what needs attention, one ticket with the bot conversation behind it, replies drafted and sent one at a time, and bulk changes (assign, prioritise, close). Use for "go through my queue", "reply to ticket 123", "close stale tickets", "move Sara's tickets to Ali". Chatbase's own help desk only, never Zendesk, Intercom or other platforms.

★ 0
Chatbase-co
Chatbase-co/chatbase-plugin

chatbase-fix-answers

Find why a Chatbase agent answered wrongly, unhelpfully or handed off, then fix it with Q&A or instruction changes and verify the fix. Use for "why did the bot say X", "fix wrong answers", "what can't it answer", "why do so many chats reach my team". Not for adding a fact the user already knows (use chatbase-teach-agent).

★ 0
Chatbase-co
Chatbase-co/chatbase-plugin

chatbase-edit-agent

Change how a Chatbase agent behaves or is configured — tone, language, rules, per-channel instructions, greeting and starter questions, temporary notices like holidays, model, security and cost limits, voice settings. Always shows the change before applying it. Use for "make it friendlier", "reply in Arabic", "we're closed Dec 24 to 26", "stop spam", "cap my credits", "switch the model".

★ 0
Chatbase-co
Chatbase-co/chatbase-plugin

chatbase-create-agent

Create a Chatbase agent from a website, or as a copy of an existing agent for a new brand, language or client, then give it real instructions and a greeting. Use for "make me a bot for mysite.com", "set up Chatbase for my store", "make a Spanish copy of our bot", "is my bot ready?".

★ 0