Tools and approvals
Partly available. A Kit can expose tools (an MCP server) that Ketvia’s assistants can use once an admin grants them. Read tools run directly; write tools always go through Ketvia’s approval cards, which show the exact change before anything is applied. The manifest’s tools section and the safe JSON Schema subset are already specified, and private Kits can already declare tools (results are shown as cards). A Kit can also choose the tool for a question itself with the planner hook.
Call context
Section titled “Call context”Every tool call to a Kit with tools.auth signature or signature+externalToken (read, preview, create and operation status) carries _meta.ketvia, set by Ketvia and never by the model: installationId, workspaceId, actorUserId, runId, audience (private or channel), locale, today (the day of that call in the workspace’s time zone, YYYY-MM-DD) and timezone (the workspace’s IANA time zone, for example Europe/Istanbul). Use today for a write that needs a date the user did not give; a preview and its create can carry different days when the approval crosses midnight. A Kit that does not need these fields can ignore them.
Notices, confirmations and inputs
Section titled “Notices, confirmations and inputs”Next to diff or items, a write tool’s preview may return what the person must see or settle before approving, for example for a document a model read: notices (at most 12; { level: "info" | "warning", text, itemIndex? }, such as “No date on the receipt; today’s date is used”), confirmations (at most 5; { id, text }, each must be ticked before Approve, such as a possible duplicate) and inputs (at most 100; a date, number or choice with id, label, required, an optional prefill, and min/max, integer or 2 to 8 options). Ids match ^[a-z][a-z0-9._-]{0,31}$ and are unique across confirmations and inputs; itemIndex points at a batch item; a prefill must satisfy its own input; the three lists together are at most 32 KiB. They are part of what the person approves: a preview that changes any of them is a different approval. Ketvia refuses an approval whose answers do not satisfy them, and only the create call receives the approved answers, as _meta.ketvia.answers = { confirmed: [ids], inputs: { id: "value" } } (a date is YYYY-MM-DD, a number its decimal text, a choice the option value; an optional input left empty is absent or ""). Preview and operation-status calls never carry answers. Validate the answers again in your create before writing. A preview that declares none of these works exactly as before.
Result cards and records
Section titled “Result cards and records”A read tool’s structured result is validated against its outputSchema; a property the schema does not declare is dropped. Ketvia
renders the card from the manifest’s card template, or from the card you return next to the result in
_meta.ketvia.card:
{ "structuredContent": { "found": true, "customerId": "4812", "customerUrl": "https://app.acme.example/customers/4812" }, "_meta": { "ketvia": { "card": { "fallbackText": "Customer 4812", "blocks": [{ "type": "header", "text": "Customer 4812" }] }, "records": [{ "type": "customer", "id": "4812", "label": "Ayşe Yılmaz" }] } }}card:blocks(the Blocks of a result card, which may hold Kit buttons, link buttons and Ketvia actions),fallbackText(1 to 200 characters) and optionallytitle(up to 80),definition(up to 300),metrics(1 to 4) andlocalDate. A card that does not validate (or has a link outsidelinkDomains) is replaced by the template card.records: the record refs the result contains ({ type, id, label }, at most 25, onlyrecordstypes you declared). Ketvia ignores the whole list when one ref is malformed or undeclared. It is the only way a note can later be linked to a record that came from the assistant’s own reading of your data: when the model data policy lets the model see this result, the assistant may save a note about one of these records (therecordargument ofnote_addorledger_addmust match a ref of the same run), and a record id the model invented is refused.- A property you need to read for a link, such as a URL or an id for a button, must be declared in the tool’s
outputSchema, with thex-ketvia-dataClassof what it identifies; the model data policy decides whether the model sees it, field by field.
Batch previews
Section titled “Batch previews”A write tool’s preview returns either a single diff (1 to 30 rows) or a batch of items: 1 to 25 changes that are
approved on one card and applied together or not at all.
{ "targetRecordId": "customer:4812", "sourceVersion": "v7", "title": "4 payment promises for Ayşe Yılmaz", "items": [ { "targetRecordId": "promise:4812:0", "title": "Payment promise 1", "diff": [{ "field": "Due", "before": null, "after": "2026-11-01" }], "followUp": { "dueDate": "2026-11-01", "text": "Check the first instalment", "amountMinor": 250000, "currency": "TRY", "record": { "type": "customer", "id": "4812", "label": "Ayşe Yılmaz" } } } ]}- Exactly one of
diffanditems. The items together are at most 48 KiB;titleup to 120 characters. followUp(optional per item) is a reminder Ketvia creates for the person who approved once the batch is applied: a private promise note with its follow-up when it has anamountMinor, otherwise a private note plus a reminder, due ondueDate. Itsrecord, if any, must be a type you declare. The follow-ups are shown on the card and covered by the approval hash; a preview that changes any item or follow-up is a different approval. Creating them is idempotent, so a retry after a crash creates nothing twice, and a failure to create one never changes the approval’s outcome (the run says so).- The create call carries
_meta.ketvia.operationId,expectedSourceVersionanditemCount. Apply all items or none, and answeroutcome: "applied"withitemsholding exactlyitemCountentries, each with itstargetRecordIdin the approved order. If the batch cannot be applied, return an error result whosecodeisstale_versionorconflict(for the whole batch); onlyoutcome: "applied"is accepted in a successful result. - Derive each item’s own idempotency key as
operationId:n(ncounted from 0), so a retry of the same operation never writes an item twice. The status lookup returns the sameitemsonce the operation is applied. - After the approval is decided, Ketvia keeps
itemsand the per-item results only as long as it keeps the rest of the run’s content; the retention scrub clears them.
What the assistant may do after a result entered the model
Section titled “What the assistant may do after a result entered the model”If the model data policy lets a result reach the model, the model may then call more read tools of
the same Kit installation. It may also save a note or a ledger entry for the person (note_add, ledger_add) but only
with a record ref taken from the _meta.ketvia.records of a model-visible result of the same run; without one the call is refused with
record_required. It never gets reminder_create, followup_done, your write tools or another Kit’s tools there.
Documents
Section titled “Documents”A tool can work from a photo or PDF the requester posted: see Documents (attachments).