Platform engineers and agent builders
Build an agent or BI view on one headless Precise Access server. Request a private per-company workspace key (penv_...) at https://sandbox.precise.ai to run SQL and MCP tools against your isolated sandbox enclave. On your own deployment, discover the enabled profile and tools before submitting a tenant read or a buy.
On this page
Headless Contract
- In-Cloud Read. Read approved columns from a pinned table snapshot inside the tenant's warehouse. Keep raw delivery logs in that cloud.
- Exact Math. Precise Gateway computes additive contributions directly. Eligible weighted-ratio games can use its deterministic Schwinger-Beta solver. Read the returned method and sample count for other games. Estimator selection and worked examples
- REST/MCP/AdCP + BI Rows. REST and MCP expose the same product operations. Query results include
columnsandrowsfor charts. A2A exposes the agent skills. Direct Seller (AdCP) requires the buyer's spending authority. - Offline Proof & DuckDB. Rerun exported SQL on the pinned data to check a figure. Verify a signed proof with its expected subject and trusted key or root. Offline verification
Run one call now
This lists the sandbox's ten MCP tools using your authenticated workspace key (Authorization: Bearer $PRECISE_SANDBOX_KEY, automatically attached when you sign in on sandbox.precise.ai).
tools/list{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}curl -sS --fail-with-body https://sandbox.precise.ai/api/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'import json, sys, urllib.error, urllib.request
BODY = {"jsonrpc": "2.0", "id": 1, "method": "tools/list"}
request = urllib.request.Request(
"https://sandbox.precise.ai/api/mcp",
data=json.dumps(BODY).encode(),
headers={
"content-type": "application/json",
"accept": "application/json, text/event-stream",
},
method="POST",
)
try:
with urllib.request.urlopen(request) as response:
if response.headers.get_content_type() == "text/event-stream":
events = response.read().decode().splitlines()
answer = json.loads(next(line[5:] for line in reversed(events) if line.startswith("data:")))
else:
answer = json.load(response)
except urllib.error.HTTPError as error:
print(f"HTTP {error.code}: {error.read().decode(errors='replace')}", file=sys.stderr)
sys.exit(1)
if isinstance(answer, dict) and (answer.get("error") or (isinstance(answer.get("result"), dict) and answer["result"].get("isError"))):
print(json.dumps(answer, indent=2), file=sys.stderr)
sys.exit(1)
print(json.dumps(answer, indent=2))const body = {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
};
const response = await fetch("https://sandbox.precise.ai/api/mcp", {
method: "POST",
headers: {"content-type":"application/json","accept":"application/json, text/event-stream"},
body: JSON.stringify(body),
});
const text = await response.text();
if (!response.ok) throw new Error(`HTTP ${response.status}: ${text}`);
const data = response.headers.get("content-type")?.includes("text/event-stream") ? text.split(/\r?\n/).filter(line => line.startsWith("data:")).at(-1)?.slice(5) : text;
const answer = JSON.parse(data ?? "");
if (answer?.error || answer?.result?.isError) throw new Error(text);
console.log(answer);The surfaces
| Capability | Runtime | Status |
|---|---|---|
| Discover the ten public MCP tools and five prompts | Sandbox | Live |
| Query, reopen runs and size a holdout over REST on the synthetic book | Sandbox | Live |
| Discover the public-test Access catalog and four cards on a configured server | Sandbox | Preview |
Run six AdCP governance tasks, a buying workflow and read-only buying_inspect on spend-capable Access | Tenant Cloud | Preview |
Diagram source
flowchart LR
agent["Your agent"] -->|MCP| mcp["Sandbox MCP server"]
service["Your service"] -->|REST| rest["Sandbox REST routes"]
mcp --> gateway["Precise Gateway"]
rest --> gateway
gateway --> book["Synthetic buying book"]
gateway -->|run_id and digest| answer["Verified run"]The sandbox's MCP tool query and its REST route POST /api/sql/run are one code path. The same SQL returns the same run_id on either.
Discover the Access profile
Read GET /api/v1/runtime, GET /api/v1/operations and GET /openapi.json on Access. In the verified public-test configuration, all 34 catalogued operations had MCP tools. OpenAPI also lists the HTTP event stream and the route that reopens a connection. Tenant-read derives the tenant from the authenticated principal. The public-test profile exposes a synthetic book. A spend-capable deployment adds governance and authorized spending.
The four public-test MCP Apps resources are ui://precise/cards/figure-card, ui://precise/cards/decision-card, ui://precise/cards/holdout-dial-card and ui://precise/cards/proof-verifier-card. A headless caller reads the tool result as JSON. Rendering a card depends on the host.
Product figures carry three kinds of context when available.
- A plain sentence comes first. Structured fields follow it.
- Read the evidence tier. In the captured API,
saidlabels a Forecast andmeasuredlabels recorded outcomes. Holdout-Proven requires an eligible comparison and confirmed delivery. Observed figures can come from logs alone. - A figure carries its source. The query or method, the tables read, the
run_id, the approver and the proof file.
Approved · Awaiting Readback earns $0 until the buying platform confirms application. Crediting net gain also requires a settled measurement window.
Discovery documents
These are live on the sandbox today.
| Address | Document |
|---|---|
/.well-known/mcp/server-card.json, /api/mcp/server-card | The MCP server card: name, version, endpoint and protocol revisions |
/.well-known/ai-catalog.json | An AI catalog entry that points at the card |
/.well-known/oauth-protected-resource | RFC 9728 metadata: the four scopes and bearer workspace authentication |
/api/catalog | The Gateway's own list: 64 methods and 5 workflows |
/api/guide | What the tables, measures, methods and workflows mean, under one digest |
GET /.well-known/mcp/server-card.jsoncurl -sS --fail-with-body https://sandbox.precise.ai/.well-known/mcp/server-card.jsonimport json, sys, urllib.error, urllib.request
try:
with urllib.request.urlopen("https://sandbox.precise.ai/.well-known/mcp/server-card.json") as response:
answer = json.load(response)
except urllib.error.HTTPError as error:
print(f"HTTP {error.code}: {error.read().decode(errors='replace')}", file=sys.stderr)
sys.exit(1)
if isinstance(answer, dict) and (answer.get("error") or (isinstance(answer.get("result"), dict) and answer["result"].get("isError"))):
print(json.dumps(answer, indent=2), file=sys.stderr)
sys.exit(1)
print(json.dumps(answer, indent=2))const response = await fetch("https://sandbox.precise.ai/.well-known/mcp/server-card.json");
const text = await response.text();
if (!response.ok) throw new Error(`HTTP ${response.status}: ${text}`);
const answer = JSON.parse(text);
if (answer?.error || answer?.result?.isError) throw new Error(text);
console.log(answer);Access also serves /openapi.json (OpenAPI 3.1), /llms.txt, /llms-full.txt, /SKILL.md and /.well-known/agent-card.json. These five documents returned HTTP 200 on the verified public-test Access server. They belong to that origin. The deployed measurement sandbox returns HTTP 404 for them.
This docs site ships its own llms.txt, llms-full.txt, SKILL.md and openapi.json at its root, so an agent can read these pages as plain text.
Scopes and keys
The sandbox enforces per-company workspace isolation (ENCLAVE_REQUIRE_KEY=on) across four scopes. Every MCP and REST data call requires a valid workspace key (penv_...) sent via Authorization: Bearer <key> or the URL-scoped MCP endpoint /api/mcp/<key>.
| Scope | Allows |
|---|---|
precise:read | Read the book, the guide, the track record and verified runs |
precise:query | Run read-only SQL or a structured join on the pinned catalog |
precise:run | Run Gateway analyses, workflows and holdout sizing |
precise:record | Record a decision, score it and move the workspace clock inside your isolated enclave |
Request a private per-company workspace key on https://sandbox.precise.ai. Unauthenticated MCP and REST data calls fail closed with HTTP 401 (workspace_required). MCP clients must also inspect the JSON-RPC error and the tool result’s isError flag, including on HTTP 200.
Where to go next
- MCP and A2A: the ten sandbox tools, resources, prompts, protocol revisions and client setup.
- REST API quickstart: the sandbox routes and the unified Access operation catalog.
- AdCP governance and buying: spend plans, signed approvals and buying inside limits.
- API and MCP playground: pick a tool or a query, edit it and run it.
- Limits and errors and the Standards map.