Connect to an API (one-time setup)
liquid_connectSet up a reusable adapter for any HTTP API by providing its URL and desired data model. The tool discovers the API and uses an LLM to map responses to your target fields, saving the adapter for later data retrieval.
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.
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 |