Connect to an API (one-time setup)
liquid_connectSet up an HTTP API by providing its URL and a target data model; returns an adapter ID for use with liquid_fetch or liquid_query.
Instructions
One-time setup for an API. Discovers the API at url, uses an LLM to map its responses onto your target_model, and saves a reusable adapter; returns an adapter_id you then pass to liquid_fetch / liquid_query / liquid_estimate. Side effects: makes outbound HTTP(S) requests to url, calls the configured LLM (requires an API key), and persists the adapter + any credentials under ~/.liquid. Idempotent — re-connecting the same url+target_model reuses the existing adapter instead of duplicating it. Use this once per API. For a quick look without saving anything, use liquid_discover instead; to read data from an already-connected API, use liquid_fetch.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"target_model": "<target_model>"
},
"name": "liquid_connect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Base URL or a specific endpoint of the API (e.g. https://api.example.com or https://api.example.com/v1/users). Also accepts a GraphQL endpoint, a WSDL URL, or grpc:// / wss:// targets. | |
| target_model | Yes | The record shape you want back: a flat map of field name -> type, e.g. {"name": "str", "price": "float", "in_stock": "bool"}. Liquid maps the API's raw response onto exactly these fields; everything else is dropped. | |
| credentials | No | Optional secrets for an auth-walled API, e.g. {"api_key": "..."}, {"token": "..."}, or {"username": "...", "password": "..."}. Stored encrypted under ~/.liquid and applied automatically on every later fetch. Omit for public APIs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | "connected" or "review_needed". | |
| adapter_id | No | Use this id with liquid_fetch/liquid_query. | |
| service | No | ||
| mapped_fields | No | ||
| endpoints | No | ||
| error | No |