Tools reference: the vector store
On this page
The nine vector_ tools: collections, documents, indexing the context's files and searching by meaning.
These nine tools are the Vector store part: a private semantic memory for each context, kept on your Mac. Sessions store documents and find them again by meaning. To see and delete what is stored, read A private memory per context. For the whole list of tools, see Cortex tools reference.
Who can call them. Every session Cortex starts while Vector store is on in Settings → MCP. Minis in rooms and task runs do not get them. An applet can call them with cortex.tools.call, if its manifest lists them and its configuration names a context.
Shared by the context. Every session of the context shares one store, and no other context sees it. So an agent should delete only what it knows is obsolete.
Switches. Agents use these tools without asking decides whether the agent's own program asks before a call. Sessions may index the context's files decides whether vector_index is offered at all. Only vector_drop asks you in Cortex.
Limits. 64 collections, 250 000 chunks and 2 GB per store. vector_add and vector_index run at most 10 calls a second per session. One vector_index runs at a time per collection. Nothing leaves your Mac.
Try it
You don't call these tools yourself: you ask in your own words, in a session, and the agent picks the tools. Saying with Cortex or naming what you want to see (a view, a tab, the Stack) makes it reach for them.
| You type | What the agent uses |
|---|---|
| Index the signed NDAs in a collection so you can find clauses by meaning | vector_create, vector_add |
| Find the past NDAs that accepted a residuals clause | vector_search |
| Forget everything you stored about the old price list | vector_forget |
Collections
vector_collections
Lists the context's collections: name, what it is for, embedder, counts, size, and whether it is stale (being re-embedded for a new macOS model, and searched by words meanwhile). Agents start here before creating one. No parameters. Read-only.
vector_create
Creates a named collection. With the cortex embedder, Cortex cuts every text into chunks and embeds them on your Mac. With the agent embedder, every document brings its own vector. Creating a collection that exists with the same embedder is fine.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
name |
string | yes | 1 to 64 letters, digits, -, _ or .. |
description |
string | no | What the collection holds and what for. The next session reads it. |
embedder |
string | no | cortex (default) or agent. |
dimension |
integer | for agent |
From 8 to 4096. |
script |
string | no | For cortex: the writing system, latin by default. Others: cyrillic, cjk, arabic, indic, thai. |
Returns. The name and existed (true when it was already there).
vector_drop
Deletes a whole collection, with everything every session of the context put in it.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
collection |
string | yes | The collection's name. |
Asking. Cortex asks you every time. It answers dropped: true once you allowed it.
Documents
vector_add
Adds documents to a collection, or replaces those whose id exists. Cortex cuts each text into chunks, Markdown at its headings, and embeds them. All of a call applies or none of it.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
collection |
string | yes | The collection's name. |
documents |
array | yes | At most 100 per call and 4 MB in all. Each: text (required, at most 1 MB), id (your own id, which replaces a document with that id), metadata (a flat object of strings, numbers and booleans to filter on later) and, for an agent collection, vector. |
Returns. The ids, the number of chunks and how many documents were replaced.
{ "collection": "decisions", "documents": [
{ "id": "2026-11-db", "text": "We keep Postgres. Reason: team knows it.", "metadata": { "kind": "decision" } }
] }
vector_index
Indexes text files of the context and its extra roots into a collection embedded by Cortex. A file's id is its path. Indexed files are kept fresh: re-indexed when they change and dropped when deleted, until vector_forget. Hidden and ignored folders are skipped. At most 5 000 files and 100 MB a call.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
collection |
string | yes | A cortex collection. |
paths |
array of strings | yes | Files or folders, relative to the context root or absolute inside it. |
glob |
string | no | Only files whose path or name matches, such as *.md or docs/*.md. |
Returns. What was indexed, unchanged, skipped (with why) and failed. Gate. Only offered while Sessions may index the context's files is on.
vector_get
Documents of a collection by id, whole: text, metadata, the path of an indexed file, and who added it and when. Read-only.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
collection |
string | yes | The collection's name. |
ids |
array of strings | yes | At most 100. |
vector_delete
Deletes documents by ids, by metadata, or by path (indexed files under it). Give at least one.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
collection |
string | yes | The collection's name. |
ids |
array of strings | no | Document ids. |
where |
object | no | Metadata that must all match exactly, such as {"kind": "decision"}. |
path |
string | no | Indexed files under this path. |
vector_forget
Removes indexed files, or every file under a folder, from a collection. They are no longer kept fresh.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
collection |
string | yes | The collection's name. |
paths |
array of strings | yes | Files or folders. |
Search
vector_search
Finds the chunks of the store closest to a query. Read-only.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
query |
string | no | What to look for, in words. |
vector |
array of numbers | no | For an agent collection, the agent's own embedding. |
collections |
array of strings | no | Default every collection the query can search. |
k |
integer | no | Default 8, at most 50. |
mode |
string | no | hybrid (default: meaning and words together, the most reliable), semantic or keyword. |
where |
object | no | Metadata that must all match exactly. |
path |
string | no | Only indexed files under this path. |
Returns. Up to k chunks: collection, document id, text, score, metadata, path and lines for a file, and who added it and when.
Something wrong or missing? Tell us