list_datasetsLABSCO SUMMARY
The sampling tools are the ones that make an agent's SQL any good.
Handing a model a schema and asking for a query produces confident nonsense about columns whose values it has never seen. Distinct values, a random sample, a top-N — those three calls turn guessing into reading, and they cost a fraction of the failed queries they prevent. The registry meta-tools are the other thoughtful piece: past a certain size, listing every tool on every turn is the real cost of a data connection, and searching them instead is the correct fix.
What it is
Spice is a data runtime that federates your sources. Its endpoint is per project in Spice Cloud rather than a shared address, and the tools it exposes depend on what you configured.
What you get
- Data — list_datasets, table_schema, sql, search
- Sampling — sample_distinct_columns, random_sample, top_n_sample, which let an agent see the shape of a table before querying it
- Runtime — get_readiness, get_current_datetime
- Memory — load and store, plus websearch
- Beyond a certain size the runtime switches to registry meta-tools, so a large tool set is searched rather than listed
Requirements
A project API key, not a personal access token. The runtime itself is open source under Apache 2.0; Spice Cloud is a subscription with usage-based pricing, and there is an enterprise route through AWS Marketplace. The open-source build sends anonymous telemetry by default.
Setup effort
Get your endpoint, then paste it — add your endpoint to your client with your key
USE CASES
Understanding a table before querying it
Distinct values, a random sample and a top-N beat guessing from the schema.
Asking the actual question
SQL across the federated datasets.
Carrying context between turns
Store and load working memory in the runtime.
Checking it is up
Readiness before you trust an answer.
12 tools
Listed in project docs. Your client may show a different list.
sqltable_schemasearchget_readinessget_current_datetimesample_distinct_columnsrandom_sampletop_n_samplememory:loadmemory:storewebsearchBEFORE YOU INSTALL
What to know first
Tools you get
12 tools named in the project's documentation.
Requires
- an MCP client that can reach a remote endpoint
- A project API key in an X-API-Key header; the endpoint is per project, so there is no shared URL
- Spice runtime v2.0.0 or later
INSTALLATION
Connect your client
https://<YOUR_PROJECT_CNAME>.spiceai.io/v1/mcp (per-project, Spice Cloud)
MCP Clients
Claude Code
export SPICE_API_KEY="<YOUR_SPICE_API_KEY>"
claude mcp add --transport http spice "https://<YOUR_PROJECT_CNAME>.spiceai.io/v1/mcp" \
--header "X-API-Key: $SPICE_API_KEY"Codex
[mcp_servers.spice]
url = "https://<YOUR_PROJECT_CNAME>.spiceai.io/v1/mcp"
env_http_headers = { "X-API-Key" = "SPICE_API_KEY" }Grok CLI
export SPICE_API_KEY="<YOUR_SPICE_API_KEY>"
grok mcp add --transport http spice "https://<YOUR_PROJECT_CNAME>.spiceai.io/v1/mcp" \
--header "X-API-Key: $SPICE_API_KEY"