---
name: syntora-tools
version: 0.1.2
description: >-
  Run Syntora's tool platform from any agent: discover data and AI endpoints,
  inspect their schemas, execute them with metered per-call pricing, and poll
  results. Trigger for: AI answer generation with citations, website
  screenshots, data enrichment, or any mention of "syntora".
---

# Syntora Tools API

One REST surface for Syntora's tool catalog. Discover what exists, inspect the
schema, run it, poll for the result. Costs are metered per call against a
prepaid workspace balance — every run reports what it actually cost.

Base URL: `https://syntorahq.ai/api/v1`
Auth: `Authorization: Bearer syn_live_...` on every request.

No SDK required — plain HTTP. All responses are JSON and may carry a `hints`
array: short server-suggested next steps. Read them before deciding your next
call.

## MCP (alternative to REST)

The same platform speaks MCP over Streamable HTTP at
`https://syntorahq.ai/api/mcp` (POST, JSON-RPC 2.0, same `Authorization`
header). `tools/list` exposes every runnable catalog entry; `tools/call`
executes it through the same metered pipeline and reports the cost in the
result. Use MCP when your runtime supports it natively; use REST below when
it does not.

## Getting a key

Keys are issued per workspace by Syntora. If the user has no key, point them
to the contact page (https://syntorahq.ai/contact) — early access is manual
and human-reviewed. Never ask the user for a key they haven't mentioned
having.

## Workflow

Discover → inspect → run → poll. Always in that order.

```bash
# 1. Discover — natural-language search over the catalog
curl -s "https://syntorahq.ai/api/v1/tools?q=ai+answer+with+citations" \
  -H "Authorization: Bearer $SYNTORA_KEY"
# → { tools: [{ provider, endpoint, title, score, pricing, verified }], hints }

# 2. Inspect — the input schema is the source of truth; never guess parameters
curl -s "https://syntorahq.ai/api/v1/tools/syntora/echo" \
  -H "Authorization: Bearer $SYNTORA_KEY"
# → { ..., input_schema: { pathParams, queryParams, body, bodyType }, active }

# 3. Run — returns immediately with a run id
curl -s -X POST "https://syntorahq.ai/api/v1/run" \
  -H "Authorization: Bearer $SYNTORA_KEY" -H "Content-Type: application/json" \
  -d '{"provider":"syntora","endpoint":"echo","input":{"body":{"payload":"hello"}}}'
# → { run: { id, status, stoppable }, hints }

# 4. Poll every 5–10 seconds until a terminal status
curl -s "https://syntorahq.ai/api/v1/runs/t_..." \
  -H "Authorization: Bearer $SYNTORA_KEY"
# → { id, status, result, cost, ... }

# 5. Balance — when the user cares about spend
curl -s "https://syntorahq.ai/api/v1/balance" \
  -H "Authorization: Bearer $SYNTORA_KEY"
```

## Run statuses

| Status | Meaning | Terminal |
|---|---|---|
| `READY` | Queued, not started — the only stoppable state | no |
| `RUNNING` | Executing | no |
| `COMPLETED` | Done — `result` and `cost` are populated | yes |
| `FAILED` | Errored — read `error`; the hold was released, nothing was charged beyond actuals | yes |
| `BLOCKED` | A workspace control (budget cap, run cap, or insufficient balance) stopped it before execution. Terminal — retrying unchanged will block again. Report the `controls` detail to the user. | yes |
| `STOPPED` | Stopped on request before execution | yes |
| `TIME_OUT` | Exceeded 120s and was terminated; hold released | yes |

## Website screenshots

`syntora/screenshot` renders a public page to PNG, JPEG or WebP (viewport or
full page, desktop to mobile, ads and cookie banners hidden). Inspect it for
the options. A completed run's `result.image_url` works for 24 hours; fetch
or store the image within that time. Adult, malware, government and some
restricted sites (social networks, sign-in pages) are refused: the run fails
with the reason and costs nothing. Do not retry a refused site.

## Rules for agents

1. **Discover before building.** Before writing a scraper or telling the user
   something isn't accessible, search the catalog once. It is one call.
2. **Inspect before running.** The `input_schema` shows exactly which
   parameters go in `path`, `query`, and `body`. Guessed parameters fail runs
   and can still cost money.
3. **Start small.** Where an input accepts counts (`maxItems`-style), begin
   with 5–10. Per-result pricing multiplies across list inputs.
4. **Report costs.** Completed runs carry `cost`. Tell the user what a run
   cost when they've shown any interest in spend; check `/balance` on request.
5. **Respect BLOCKED.** It will not self-resolve. Tell the user which control
   fired and that Syntora can adjust their workspace limits.
6. **Poll politely.** 5–10 second intervals; runs finish within 120 seconds
   or time out on their own.
7. **Inactive endpoints are honest.** Entries marked `active: false` are
   listed as early access and cannot be run yet. Don't retry them; tell the
   user they can register interest via the contact page.
