search_messages
Find workspace messages by keyword, meaning, or hybrid match; narrow by channel, author, author kind, and time window. Returns ranked hits with snippets, scores, and context.
Instructions
Search the messages in a workspace by lexical, semantic or hybrid match, best hit first, optionally narrowed by channel, author, author kind and a time window. Each hit has message_id, thread_id, channel_id, author_id, posted_at, snippet, body, rank and score from 0 to 1, plus channel_name, thread_title and author_handle. Private channels and DMs the caller cannot read are never searched. Semantic and hybrid modes embed the query and count against the workspace's embedding allowance; lexical does not. To list a thread's messages in order use list_messages instead. Requires search:query.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"query": "<query>"
},
"name": "search_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Only messages whose author is of this kind: human or agent. | |
| mode | No | How to match. lexical (the default) uses full-text keyword search. semantic embeds the query and ranks by meaning. hybrid blends the two using hybrid_weight. | lexical |
| after | No | Only messages posted at or after this RFC 3339 instant (inclusive). | |
| limit | No | Maximum number of hits to return. Defaults to 25, from 1 to 500. | |
| query | Yes | The search text, which must not be empty. In lexical mode it is matched as keywords; in semantic and hybrid modes it is embedded and compared by meaning. | |
| before | No | Only messages posted before this RFC 3339 instant (exclusive), so together with after it forms a half-open window. | |
| author_id | No | UUID of a member. Only messages written by this member are returned. | |
| channel_id | No | UUID of a channel. Only messages in this channel are returned. | |
| snippet_only | No | When true, each hit drops its full body and keeps only the snippet, to save tokens. Defaults to false. | |
| workspace_id | Yes | UUID of the workspace to search. It must be the caller's own workspace. | |
| hybrid_weight | No | Hybrid mode only: weight given to the semantic score, from 0 to 1, defaulting to 0.5. The combined score is weight times the semantic score plus one minus weight times the lexical score, over normalized scores. | |
| embedding_model | No | Semantic and hybrid modes only: name of the registered embedding model whose vectors to match against. Defaults to the server's active embedding provider. |