Search Collection
collection.searchRetrieve raw matching chunks from a document collection via semantic search, ranked by relevance scores.
Instructions
Semantic (vector) search across documents in a collection. Returns ranked text chunks with relevance scores. Free — no credits consumed. Use when you need raw matching chunks from a collection. For a synthesized cited answer from the same context, use collection.ask instead. PREREQUISITE: Collection must be populated via collection.add_document and async indexing must complete (poll job.status) before results appear. Returns: { results: [{ bundle_id, chunk_id, text, score: number (0–1), title? }] } Example prompts:
"Search my Q4 Contracts collection for mentions of liability cap."
"Find the clause about data retention in my due diligence docs."
"Search for revenue numbers across my quarterly reports."
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max chunks to return (default 10, max 50). Example: 5 | |
| query | Yes | Natural language search query. Example: "What were the revenue numbers for Q4?" | |
| collection_id | Yes | Collection ID (col_...) returned by collection.create. Example: "col_550e8400-e29b-41d4-a716-446655440000" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes |