Agent tools

document

document({ action: "add" | "list" | "remove", path?, storage?, document? })

Index a document so that semantic search can find it by meaning. Without it, that search only ever finds what a human uploaded.

read on list, write otherwisefeeds query_storage searchworkspace files
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

actionstringrequired

add · list · remove.

pathstring

The workspace file to index — a PDF, a DOCX, text.

storagestring

By label. The account's default otherwise.

documentstring

The id, from list.

What it is for

It closes a loop the agent could not close on its own

query_storage { action: "search" } finds documents by meaning — but only ones that were indexed. Without this tool an agent could produce a report and never be able to find it again by what it says.

The pair

document({ action: "add", path: "Reports/q3.pdf" })
query_storage({ action: "search", query: "what did we say about churn" })
# The calls the model makes:
document = {"action": "add", "path": "Reports/q3.pdf"}
query_storage = {"action": "search", "query": "what did we say about churn"}

What it costs

Indexing uploads the file and consumes the storage's space. The search itself is a credit per call.

list is free

The category is computed from the action: listing is a read, adding and removing are writes.