MCP
Tool Reference
💬Get free consultation

MCP tool reference

Who can use this feature?

  • You need the Pro or Plus plan to create and manage API keys.
  • This page is for developers building against the MCP server. Start at the MCP overview for connection and authentication.

How to read this page

Chatty exposes 17 tools. Eight are always registered. Nine depend on a switch in your AI agent settings, read fresh on every request. Your bot should call tools/list after connecting rather than trusting any list, including this one.

Every tool returns MCP text content: one content entry of type: "text". Most tools put a JSON object in that text, so parse it. A few return plain prose when there is nothing to report — No products found., No results found., No test conversations found., No team members found.. A tool that fails returns 200 with {"error": "..."} inside the text, not a protocol error.


Tools at a glance

ToolWhat it doesChanges anything?Switch that registers itPlan needed for the switch
send_messagePosts a bot reply into a conversation.Yes, and the customer sees itAlways onAll
faq_retrievalSearches your knowledge base.NoAlways onAll
add_noteAdds an internal note to a conversation.YesAlways onAll
update_tagsReplaces the tags on a conversation.Yes, replaces the whole listAlways onAll
assign_memberAssigns or unassigns a team member.YesAlways onAll
list_membersLists team members and their ids.NoAlways onAll
list_conversationsLists test conversations from the AI playground.NoAlways onAll
register_webhookCreates a webhook subscription and returns its signing secret.YesAlways onAll
product_lookupSearches products and variants.NoTraining data > ProductsAll
product_faq_lookupReturns FAQs for one product.NoTraining data > ProductsAll
manage_cartReads and edits the Shopify cart.Yes, except action: "get"Training data > ProductsAll
collection_lookupSearches collections and categories.NoTraining data > CollectionsAll
discount_lookupFinds discounts and promo codes.NoTraining data > DiscountsAll
size_guide_lookupReturns a size chart for one product.NoAssistant skills > Size guidePro
check_order_statusTracks an order by order number or tracking number.NoAssistant skills > Order trackingBasic
customer_supportRuns an after-sale request: return, refund, cancel, edit.NoAssistant skills > After-sale supportAll
human_agent_transferHands the conversation to a person.NoAssistant skills > Human handoverAll

customer_support and human_agent_transfer return a reply for your bot to send. Nothing reaches the customer until you call send_message.


Identifiers

Most tools need an id that only another tool can give you. Copy it exactly as Chatty returned it — never build, shorten, or reformat one.

IdentifierShapeWhere you get it
convoIdOpaque. Two shapes are in use: an all-digit id, and a 20-character mixed-case id. Both are valid, so do not normalize either.The webhook payload, the X-Chatty-Convo-Id header, or GET /chat/conversations.
memberIdOpaque string.list_members.
productIdgid://shopify/Product/<digits>product_lookup. Needed by product_faq_lookup and size_guide_lookup.
variantIdgid://shopify/ProductVariant/<digits>The variants array in a product_lookup result. Preferred for manage_cart add.
cartIdThe Shopify cart id, passed through untouched.Any manage_cart call. Required for get, update, and remove.
lineItemIdgid://shopify/CartLine/<uuid>?cart=<token>manage_cart with action: "get". Required for update and remove. The ?cart= part belongs to the id — drop it and the id is rejected.
Webhook secretwhsec_ followed by 48 hex characters.register_webhook, once.

Always available

These eight are registered for every store, on every plan that can hold an API key.

send_message

Sends a bot message to a conversation. Call it after composing your answer.

ParameterTypeRequiredDescription
convoIdstringYesThe conversation to post into. Must belong to the store the key belongs to.
textstringYesThe message body.
topicstringNoTopic classification, for example Product inquiry or Order status. Defaults to General inquiry.

Returns { "messageId": "...", "convoId": "...", "saved": true }. The message is stored as an automated bot message. Errors: Conversation <id> not found, Conversation does not belong to this shop.

faq_retrieval

Searches your store's knowledge base: FAQs, scenarios, pages, and files.

ParameterTypeRequiredDescription
querystringYesThe search text.

Returns an object with scenarios, faqs, pages, files, and any products those entries link to. Returns the text No results found. when nothing matches.

add_note

Adds an internal note to a conversation. Notes are visible to your team only, never to the customer.

ParameterTypeRequiredDescription
convoIdstringNoThe conversation. Falls back to the X-Chatty-Convo-Id header. One of the two must be present.
textstringYesThe note body. Whitespace is trimmed.

Returns { "noteId": "...", "convoId": "...", "saved": true }.

update_tags

Sets tags on a conversation. This replaces the existing tags — it does not merge. Read the current tags first if you mean to add one.

ParameterTypeRequiredDescription
convoIdstringNoThe conversation. Falls back to the X-Chatty-Convo-Id header.
tagsstring[]YesThe full tag list. Each entry is trimmed and truncated to 50 characters, with no error when a tag is shortened. Empty entries are dropped, duplicates are removed, and only the first 100 tags are kept. Tags that do not exist yet are created.

Returns { "convoId": "...", "tags": ["..."], "saved": true }. An all-empty list returns {"error": "No valid tags provided"}.

assign_member

Assigns a team member to a conversation, or unassigns.

ParameterTypeRequiredDescription
convoIdstringNoThe conversation. Falls back to the X-Chatty-Convo-Id header.
memberIdstringNoThe member to assign. Takes priority over email.
emailstringNoThe member's email, as an alternative to memberId.

Omit both memberId and email to unassign.

Returns { "convoId": "...", "memberId": "...", "memberName": "...", "assigned": true } when assigning, or { "convoId": "...", "memberId": null, "unassigned": true } when clearing. Errors: Member not found, Member is not active, Member does not belong to this shop.

list_members

Lists team members for your store. Use it to find member ids before assigning.

Takes no parameters.

Returns { "members": [ { "id", "email", "firstName", "lastName", "fullName", "role", "active" } ] }. Returns the text No team members found. when the store has none.

list_conversations

Lists test conversations, with cursor pagination.

ParameterTypeRequiredDescription
limitnumberNoConversations per page. Default 20, and there is no maximum — whatever number you pass is what the query returns, so keep it to a size your client can handle.
afterstringNoConversation id cursor. Fetches the page after this one.
beforestringNoConversation id cursor. Fetches the page before this one.
sortstringNoField and direction, for example updatedAt_desc or createdAt_asc. Default updatedAt_desc.
searchstringNoMatches on conversation id.

Returns a formatted text list, not JSON: one line per conversation with its id, updatedAt, and the first 100 characters of the last message, followed by a pagination line naming the before and after values to use next.

list_conversations returns test conversations only, the ones from the AI agent playground, not your live customer inbox. To read live conversations, use GET /chat/conversations on the Chat Conversations API.

register_webhook

Registers a webhook subscription and returns its signing secret.

ParameterTypeRequiredDescription
urlstringYesThe HTTPS URL that receives deliveries.
eventsstring[]YesEvent names. Valid values: message.created, message.updated, message.removed, conversation.created, conversation.state_changed, conversation.assigned, conversation.tags_updated, conversation.removed, customer.created.

Returns { "subscriptionId": "...", "url": "...", "events": [...], "secret": "whsec_...", "active": true }.

!

secret is shown once, here. It is returned nowhere else, and Chatty ignores any secret you try to supply. Store it at registration or you will have to delete the subscription and create a new one. Your store can hold at most 10 subscriptions.


Registered by Training data > Products

One switch registers all three. Turning on AI agent > Training data > Products gives your bot product search, product FAQs, and full cart write access at the same time. There is no separate cart switch. This switch is off by default.

product_lookup

Searches products and services. Also answers variant and stock questions — put the requested option in attributes so the result carries that variant's inventory.

ParameterTypeRequiredDescription
primarySearchCriteriastring[]NoSearch modes. Values: collection, sku, barcode, productName, productType, attributes, price, general, related, complementary. A bare string is accepted and wrapped in an array.
productHandlesstring[]NoHandles from /products/handle-name URLs. Default [].
productLimitnumberNoHow many products to return. Default 10.
sortBystringNoOne of relevance, best_selling, newest, price_low, price_high, similar, complementary.
availabilitystringNoOne of all, in_stock, out_of_stock, available, unavailable.
minPricenumberNoLower price bound.
maxPricenumberNoUpper price bound.
priceCurrencystringNoISO 4217 code, only when the customer names a currency.
isNextPagebooleanNoTrue when paging through more of the same results.
skustringNoSKU, part number, model number, or catalog code. Pair with sku in primarySearchCriteria.
barcodestringNoBarcode, UPC, EAN, or ISBN.
productCollectionstringNoCollection, category, or product line named by the customer. Pair with collection in primarySearchCriteria.
attributesstringNoAttributes as key:value, key:value. Common keys: color, material, size, brand, style, pattern, gender, productType, productName, features. An object or an array of {attribute, value} is also accepted and normalized.

Returns { "products": [ ... ] }. Each product carries productUrl, inventory, and a variants array with per-variant id, options, price, SKU, and barcode. Returns the text No products found. when nothing matches.

product_faq_lookup

Returns FAQs and detail for one product. Call product_lookup first and copy the id verbatim.

ParameterTypeRequiredDescription
productIdstringYesThe productId from a prior product_lookup result.
productTitlestringNoThe product title, used to widen the match.
productUrlstringNoAccepted by the schema but ignored by the MCP handler. Sending it changes nothing.

Returns { "productFaqs": [ ... ] }, or the text No product FAQs found.

manage_cart

Reads and edits the Shopify cart. MCP is stateless, so the cart id is explicit on every call.

ParameterTypeRequiredDescription
actionstringYesOne of get, add, update, remove.
cartIdstringConditionalRequired for get, update, and remove. Optional for add — omit it to create a new cart.
lineItemsobject[]ConditionalRequired for add, update, and remove. Omit for get. Fields below.

Each entry in lineItems:

FieldTypeRequiredDescription
lineItemIdstringNoCart line id from a prior get, in the form gid://shopify/CartLine/{uuid}?cart={token}. Copy it verbatim. Preferred for update and remove.
variantIdstringNogid://shopify/ProductVariant/{id}. Preferred for add.
productIdstringNogid://shopify/Product/{id}. Used when no variant id is available. A single-variant product resolves; a multi-variant product prompts for the option.
productHandlestringNoURL slug from /products/<slug>. Last resort.
variantOptionsstringNoOption string such as Black / 2, used to pick the variant.
quantitynumberNoFor add, how many to add, default 1. For update, the new absolute quantity, default 1. For remove, how many to take out — omit to remove the whole line.

Returns { "cartId": "...", ... } with the line items, prices, total, and checkout URL. get on a missing cart returns {"error": "Cart not found or expired"}. add with nothing resolvable returns {"error": "No valid product variants found. Use product_lookup first to get variantId."}. update or remove without cartId returns {"error": "cartId is required for \"update\"."}.


Registered by their own switch

collection_lookup

Searches collections and categories. Registered by AI agent > Training data > Collections, which is off by default — this is the one tool most stores never see.

ParameterTypeRequiredDescription
querystringNoSearch text, for example summer or new arrivals.
limitnumberNoMaximum collections returned. Default 10.
listAllbooleanNoSet true to list every collection instead of searching. Default false.
includeProductsbooleanNoAccepted by the schema but ignored by the MCP handler. Products inside a collection do not come back over MCP — call product_lookup with productCollection instead.

Returns { "collections": [ { "title", "description", "image", "collectionId", "url" } ] }, or the text No collections found.

discount_lookup

Finds discounts and promotions. Registered by AI agent > Training data > Discounts, off by default. All four parameters are optional; sending none returns the store's general offers.

ParameterTypeRequiredDescription
productIdsstring[]Nogid://shopify/Product/... values. From cart data, take merchandise.product.id, not merchandise.id, which is the variant.
productTitlesstring[]NoProduct titles. From cart data, take merchandise.product.title.
collectionTitlesstring[]NoCollection titles the customer named.
codesstring[]NoSpecific discount codes. Pass one to get that code's own conditions instead of the best general offer.

Returns { "discounts": [ ... ] } with codes, requirements, and benefits, or the text No discounts found.

size_guide_lookup

Returns the size chart matched to one product. Registered by AI agent > Instructions > Assistant skills > Size guide, off by default, Pro plan.

ParameterTypeRequiredDescription
productIdstringYesThe productId from a prior product_lookup result.
intentstringNoOne of fit_recommendation, show_chart, dimensions. Accepted by the schema but ignored by the MCP handler — the same chart comes back either way.
customerMeasurementsobjectNoMeasurements as key-value pairs, using the keys from measurementFields in a prior call. Values may be strings or numbers.

Returns { "sizeChart": "<markdown table>" }, plus measurementFields when the guide defines them and customerMeasurements echoed back when you sent any. Errors: No productId provided. Use product_lookup first., Size guide not found for this product.

Do not use this for stock questions. product_lookup answers whether size XL is available.

check_order_status

Tracks an order. Registered by AI agent > Instructions > Assistant skills > Order tracking, on by default, Basic plan or higher.

ParameterTypeRequiredDescription
searchMethodstringNotrack_by_order_number or track_by_tracking_number. Defaults to track_by_order_number, or to tracking number when only a tracking number is supplied.
orderInfoobjectNoCustomer-supplied details. Defaults to {}. Fields below.

Fields inside orderInfo:

FieldTypeRequiredDescription
orderNumberstringConditionalRequired for track_by_order_number. Strip any leading #.
emailstringConditionalVerifies the order. Either email or phone is required for track_by_order_number.
phonestringConditionalAlternative to email.
trackingNumberstringConditionalRequired for track_by_tracking_number.

Returns { "order": { ... } } with status, tracking, items, and address, plus deliveryFaqs when your knowledge base has matching shipping content. Missing fields return {"error": "Order number is required for order lookup. Email or phone number is required for order verification"} before any lookup runs.

customer_support

Runs an after-sale request. Registered by AI agent > Instructions > Assistant skills > After-sale support, on by default.

ParameterTypeRequiredDescription
issueTypestringYesOne of returnRefund, cancelOrder, issueOrder, editOrder.
customerDataobjectNoDetails gathered so far, used to pre-fill the form. Defaults to {}. Fields: orderNumber (string), issueDetails (string), email (string).
isConfirmedbooleanNoSet true only after the customer explicitly agrees to proceed.
isDeclinedbooleanNoSet true only after the customer explicitly declines.
isSubstantiveQuerybooleanNoDefault true. Set false only for a greeting or thanks with no after-sale intent.

Returns the configured response for that request type: the confirmation prompt on the first call, then the outcome once isConfirmed is true. The transfer method and form fields come from your after-sale settings, per issue type.

Over MCP the customer's email and phone are not carried in request context the way they are inside the chat widget. Pass what you know in customerData or the form comes back empty.

human_agent_transfer

Hands the conversation to a person. Registered by AI agent > Instructions > Assistant skills > Human handover, on by default. Two steps: ask, then fire.

ParameterTypeRequiredDescription
triggerTypestringYesOne of customer_request, ai_cannot_answer, repeated_question, negative_sentiment, intent_rule. Judge it at the turn the need first arose, not at the confirmation turn.
customerRequeststringNoThe customer's own words asking for a person.
matchedIntentRulestringNoThe rule name, when triggerType is intent_rule.
isConfirmedbooleanNoDefault false. First call must be false, which asks the customer to confirm. Send true on the follow-up, with the same triggerType.
isDeclinedbooleanNoDefault false. True only when the customer says no after being asked.
isSubstantiveQuerybooleanNoDefault true. Set false only for a non-substantive message with no request to reach a person.

Returns the handover response, which reflects your business hours and current agent availability — the answer differs outside working hours.


Need help?

Contact the Chatty support team from your dashboard. Include the tool name, the timestamp of a failing call, and the returned error message.

For connection, authentication, and security, see the MCP overview.