1) Find a specific entity, then explain it
capsulate:searchwithtype="entity"and a keyword (merchant, order number, tracking number).capsulate:fetchfor the selectedentity:*id.- If the user asks “where did this come from?”, follow the linked messages and use
capsulate:fetchformessage:*.
2) Find the right canvas/pattern for a question
capsulate:canvases_listorcapsulate:patterns_listfor a quick inventory.capsulate:searchwithtype="canvas"ortype="pattern"when you need keyword-based lookup.capsulate:fetchfor the selectedcanvas:*orpattern:*id to confirm scope.
3) Determine which fields you can group/measure
capsulate:records_schemawith acanvas_id(orpattern_id).- Pick a
group_field(categorical) and optionally ametric_field(numeric).
4) List logical records for a Canvas
capsulate:records_findwithcanvas_idand optional typed field filters.- Select only the fields needed and keep the initial limit small.
- Use
capsulate:record_getfor a specific stablerecord_id.
5) Trend over time
capsulate:records_timeserieswith acanvas_idorpattern_id.- Start with
interval="month"and nometric_field(count), then addmetric_field(sum/avg) if needed.
6) Top groups (e.g., merchants, statuses, categories)
capsulate:records_aggregatewithgroup_fieldand optionalmetric_field.- Add a date range to answer “in the last 30 days”.
7) Jump from an email to structured data
capsulate:searchwithtype="message"for the message.capsulate:fetchformessage:*to get linked entity IDs.capsulate:bulk_fetchfor those entities (and optionally expand related data).
8) Get the full context for an evolving event
capsulate:fetchforthread:*.- Summarize the sequence of messages; fetch specific
message:*records if the user needs details.
9) Reduce tool calls with batching
Usecapsulate:bulk_fetch when you already have many IDs (entities/messages) and want details in one response.
