The actions
| Action | On | Takes |
|---|---|---|
overview | any | — |
collections · schema · find · count · aggregate | a document database | collection, and filters as JSON text |
tables · sql | a relational database | sql, params |
objects · object | a bucket | prefix, key |
usage | an IaGenify Cloud storage | storage, or nothing for the account |
search | any | query, limit — 1 credit |
overview first
It returns everything the storage holds — collections or tables with their fields and one real example each, or a bucket's folders with what they weigh — in a single call. Discovering the shape one call at a time is a turn each.
Examples are masked
In those examples a value that looks like a secret or personal data — a password, a token, a hash, a key, an address, a phone number — is replaced by a marker followed by its type. The field is real, the value is not. The agent is told never to filter on a marker, and to read the field with find if the task truly needs it.
Filters travel as JSON text
query_storage({
action: "aggregate",
collection: "orders",
pipeline: '[{"$match":{"status":"paid"}},{"$group":{"_id":"$model","total":{"$sum":"$amount"}}}]',
})# The call the model makes:
query_storage = {
"action": "aggregate",
"collection": "orders",
"pipeline": '[{"$match":{"status":"paid"}},{"$group":{"_id":"$model","total":{"$sum":"$amount"}}}]',
}As a free-form object the keys beginning with $ are stripped, and a filter with no operator is a different query rather than a failed one. As text nothing is touched.
One aggregate, never a series of finds
For totals, averages and breakdowns the instruction is explicit: $match, then $group, then $sort. Paging through find to add numbers up costs a turn per page and gets them wrong.
Name the storage when there are several
storage takes the label as the system prompt lists it under « Connected storages ».