Pull run metrics, download outputs, and run SQL across runs, batches, and spans from the Cargo CLI.
Memory
cargo-storage
Try itInspect and modify Cargo workspace data models, then run SQL against storage.
What it does
Manage the data layer of a Cargo workspace through the CLI: list, create, and update models, datasets, columns, relationships, and records. Run SQL against workspace storage with `storage query execute` for ad-hoc reads or `storage query download` for full CSV/Parquet exports. Supports ingest (webhook-fed) models, column type and kind configuration, and previewing rows after data lands.
When to use it
- Listing models, datasets, and columns to discover a workspace's schema
- Adding or updating columns, models, and relationships to shape business data
- Running ad-hoc SQL queries against workspace storage with execute or download
- Setting up ingest (webhook-fed) models and previewing rows after a batch writes
The skill document
Cargo CLI — Storage
Data layer management: inspecting and modifying models, datasets, columns, relationships, and records, and running SQL queries against workspace storage.
See
references/response-shapes.mdfor full JSON response structures. Seereferences/troubleshooting.mdfor common errors and how to fix them. Seereferences/examples/models.mdfor model CRUD, DDL inspection, and schema discovery examples. Seereferences/examples/datasets.mdfor dataset listing and navigation examples. Seereferences/examples/columns.mdfor column creation and management examples. Seereferences/examples/queries.mdforstorage query execute/storage query downloadSQL examples (WHERE, aggregations, joins, pagination, exports). Seereferences/examples/ingest-webhook.mdfor ingest (webhook-fed) models — deriving the webhook URL and POSTing records.
Prerequisites
See ../cargo/references/prerequisites.md for install, login (--oauth / --token), JSON output conventions, and error shapes. Verify the session with cargo-ai whoami before running any of the commands below.
Discover resources first
Always list before inspecting or modifying.
cargo-ai storage dataset list # all datasets (uuid, slug)
cargo-ai storage model list # all models (uuid, name, slug, columns)
cargo-ai storage model list --dataset-uuid # models in a specific dataset
Retrieve in the UI: models live at app.getcargo.io/workspaces//models/. Get `` from cargo-ai whoami under workspace.uuid.
Quick reference
cargo-ai storage model list
cargo-ai storage model get
cargo-ai storage model get-ddl
cargo-ai storage dataset list
cargo-ai storage column list --model-uuid
cargo-ai storage relationship list --model-uuid
cargo-ai storage record list --model-uuid
cargo-ai storage query execute "SELECT * FROM default.companies LIMIT 10"
cargo-ai storage query download --query "SELECT * FROM default.companies"
Models
Models are structured tables in your workspace (e.g. Companies, Contacts).
# List all models
cargo-ai storage model list
# List models in a dataset
cargo-ai storage model list --dataset-uuid
# Get a single model (includes columns)
cargo-ai storage model get
# Get the DDL (full schema, table name and SQL dialect)
cargo-ai storage model get-ddl
# → Useful for column discovery and SQL dialect (BigQuery vs Snowflake) before writing queries
# Create a model
cargo-ai storage model create \
--slug contacts \
--name "Contacts" \
--dataset-uuid \
--extractor-slug \
--config '{}'
# Update a model
cargo-ai storage model update --uuid --name "New Name"
# Remove a model
cargo-ai storage model remove
Querying: Use cargo-ai storage query execute "" (or storage query download --query "" for full exports) to run SQL against storage. Tables are referenced as . (e.g. default.companies) and rewritten to the underlying storage table under the hood. See Query with SQL below.
Ingest models (webhook-fed)
A model whose extractor has mode.kind === "ingest" — http.listenHook and
friends — is filled by pushing records to Cargo. The app shows a "Webhook URL"
on the model settings screen; no CLI command or API field returns it, but it's
assembled from values the CLI already exposes:
/v1/models//records/ingest?token=
MODEL_UUID=
BASE=$(cargo-ai whoami | jq -r '.baseUrl')
TOKEN=$(cargo-ai workspaceManagement token list | jq -r '.tokens[0].token')
echo "$BASE/v1/models/$MODEL_UUID/records/ingest?token=$TOKEN"
Check the extractor's mode first — when it reports "autoIngest": true (calendly,
smartlead, instantlyV2, heyReach, datachimp, cargo signals) Cargo registers the
hook with the provider itself and the URL must not be handed out. Full flow,
payload shapes, and limits: references/examples/ingest-webhook.md.
Datasets
Datasets are logical groupings of models.
# List all datasets
cargo-ai storage dataset list
# Get a single dataset
cargo-ai storage dataset get
Columns
Columns define the schema of a model.
# List columns for a model
cargo-ai storage column list --model-uuid
# Create a column
cargo-ai storage column create \
--model-uuid \
--column '{"slug":"my_column","type":"string","label":"My Column","kind":"custom"}'
# Update a column (pass the full column object — columns are identified by slug, not UUID)
cargo-ai storage column update \
--model-uuid \
--column '{"slug":"my_column","type":"string","label":"Updated Label","kind":"custom"}'
# Remove a column
cargo-ai storage column remove --model-uuid --column-slug
# Reorder a column (move to a specific index)
cargo-ai storage column reorder --model-uuid --column-slug --to-index 2
Column types: string, number, boolean, date, object, array, vector, any.
Column kinds: custom (user-defined), computed (expression over other columns), metric (aggregated from a related model), lookup (single field pulled from a related model via a join).
Preview what you built
A column list doesn't tell the user whether the model is right — rows do. Two checkpoints (the pack-wide convention lives in ../cargo/references/interaction.md §4):
1. Right after model create / column create — show the schema, not rows. A new model is empty; a LIMIT 10 here returns nothing and reads as failure. Echo the columns as a compact table instead (column, type, what will fill it).
2. As soon as data lands — show the rows. After a batch, play, or import writes into the model, preview it:
cargo-ai storage query execute \
"SELECT * FROM . LIMIT 10"
Show ~10 rows and only the columns that carry meaning. Storage queries are free, so this costs nothing but a few lines of output — and it's the first moment the user can actually see what they built. When a play fills a new column, preview that column next to the record's identifying fields (name, domain) so filled vs. empty is obvious.
If the preview comes back empty or all-null when it shouldn't, that's a finding — surface it rather than reporting the write as a success. See cargo-diagnostics to trace why.
Relationships
Relationships link models together (e.g. Contacts belong to Companies).
# List relationships for a model
cargo-ai storage relationship list --model-uuid
# Set a relationship between two models
cargo-ai storage relationship set \
--from-model-uuid \
--to-model-uuid
Records
# List records in a model
cargo-ai storage record list --model-uuid
For advanced record queries (filtering, sorting, pagination), use segmentation segment fetch from the cargo-orchestration skill.
Query with SQL
Run SQL against workspace storage with storage query execute. Tables are referenced as . (e.g. default.companies) and rewritten to the underlying storage table under the hood — no DDL lookup is needed for the table name.
cargo-ai storage query execute \
"SELECT name, domain FROM default.companies LIMIT 10"
# → { "rows": [...] } on success; non-zero exit with { "errorMessage": "..." } on error
For full exports, use storage query download — it returns a signed URL to a CSV (default) or Parquet file:
cargo-ai storage query download \
--query "SELECT name, domain, revenue FROM default.companies ORDER BY revenue DESC"
cargo-ai storage query download \
--query "SELECT * FROM default.companies" --format parquet
Get column slugs from storage column list --model-uuid (or run storage model get-ddl for the full schema and SQL dialect). Page through large result sets with LIMIT / OFFSET directly in the SQL.
See references/examples/queries.md for WHERE clauses, aggregations, joins, date queries, pagination, and the failure shapes returned on error.
Help
Every command supports --help:
cargo-ai storage model list --help
cargo-ai storage column create --help
cargo-ai storage relationship set --help
cargo-ai storage query execute --help
cargo-ai storage query download --help
Questions people ask
- What data structures can I manage with this skill?
- Models, datasets, columns, relationships, and records. Columns accept types like string, number, boolean, date, object, array, vector, and any, and kinds including custom, computed, metric, and lookup.
- How do I run a SQL query against the workspace?
- Use `cargo-ai storage query execute "..."` for row results, or `storage query download --query "..."` to get a signed URL to a CSV (default) or Parquet export. Tables are referenced as `dataset.table` and rewritten to the underlying storage table.
- When should I use a different skill instead?
- Use `cargo-orchestration` for run or batch telemetry and `cargo-segmentation` when naming a reusable filtered audience. This skill is for business data structures and SQL over workspace storage, not execution telemetry.
Related skills
Define and use segments — named, saved filters over a Cargo model that become the audience for a batch run, a play trigger, or an export. Triggers: "build a segment of", "filter my contacts where", "who matches this criteria", "save this as a list", "how many companies match", "the Closed-Won segment", "everyone who has not been emailed", "target only accounts that", "what is in this segment", "narrow this down to". Filter JSON uses `conjonction` (not `conjunction`) — misspelling it fails silently. Skip when: running something over the segment — use cargo-orchestration; exporting its rows — use cargo-analytics; ad-hoc SQL over the model — use cargo-storage.
Execute, build, diagram, and query Cargo workflows, actions, batches, and AI agents from one CLI surface.
Manage a Cargo workspace and file feedback to the Cargo team from the CLI.
Guided first-run demo for Cargo — one persona question to 25 real leads with a cost receipt in under two minutes, ending by saving the pull as a recurring play. Triggers: "show me what Cargo can do", "give me a demo", "take me on a tour", "quickstart", "getting started with Cargo", "I just installed Cargo", "my workspace is empty", "does this actually work". Skip when: the user has a real job to run (build a list, enrich a CSV, find emails) — use cargo-gtm; when they want CLI reference or routing — use the cargo router skill.
Drive Cargo from its hosted MCP server at https://mcp.getcargo.io/mcp — connect a client, discover and price an action, run it over one record or a batch, poll it, and read workspace models, with no CLI install. Also when to call an MCP tool instead of shelling out to `cargo-ai`. Triggers: "connect Cargo to Claude Desktop", "add Cargo to ChatGPT", "Cargo MCP server", "mcp.getcargo.io", "use Cargo without installing anything", "which Cargo tool do I call", "search_actions", "execute_action_batch", "MCP server is showing the wrong workspace". Tools: whoami, search_actions, get_action_schema, execute_action, execute_action_batch, get_run, query_models. Skip when: you have a shell and the job is a workflow, a CDK deploy, warehouse SQL, or a mailbox — use the CLI skills; when publishing an MCP server out of your own workspace or attaching one to a Cargo agent — use cargo-ai.