Zvessa docs

Search

One search across a space: pages, records, messages, feed posts, people and files. People use the search block; any AI uses the search tool (in-app chat, MCP, or API keys). Everyone only finds what they could open anyway; the server checks every result.

The block #

{ "id": "find", "kind": "search", "props": { "sources": ["records"], "collection": "tasks-items", "placeholder": "Find a task" } }
PropWhat it does
sourcesSome of pages, records, messages, posts, people, files. Default all.
collection / stream / feedOnly that collection, conversation or feed.
limitResults per kind, 1–25 (default 5).
title, placeholder, emptyWords on the block.
groupsSmall heading per kind (default true).

Words are settings too: blueprint.words["search.placeholder"], search.empty, search.short, and one per kind (search.records…).

Recipes: a people finder (sources: ["people"]), a search inside one chat (stream: "general"), a product finder on a catalog page (collection: "catalog-items").

The kit #

Search (Tools): adds a Search page with one search box. Optional; the block works anywhere.

The tool #

search { query, sources?, collection?, stream?, feed?, limit? } (scope data.read, read-only). Returns a list of { kind, id, title, snippet, at, by, open }; open says where it lives: page (+block), key (+thread) for a conversation, post, userId, collection, media. With an MCP token it searches as the token's person. The in-app AI searches as a manager but never sees anyone's direct chats or private groups.

What each person finds #

Pages and blocks they can see (visibleTo, levels, badges; never HQ) · records in collections not hidden from them · messages in conversations they can open (held posts only for the writer and moderators, hidden posts for moderators, case notes for the team) and their own direct chats · feed posts they could see in the feed · members (only if they are a member) · files they uploaded or that sit in a gallery they can see.

For developers #

api.kits.search.search.everywhere({ q, sources?, collection?, stream?, feed?, limit? }). Search uses Convex search indexes on records.text, posts.text, feedPosts.text and media.name. Code that writes records must also write text: recordText(data) (convex/lib/search.ts). After upgrading an existing deployment, run npx convex run kits/search/search:_backfill once.