@jedify/sdk is the TypeScript SDK that calls semantic functions from a running app. Your agent writes this code for you — you don’t need to. This page is here so you can review what your agent generates, and so a developer on your team has a reference. (The MCP tools are for building; the SDK is what the finished app uses at runtime.)
Not a developer? You don’t need to read the code below. When you review what your agent built, just check three things: it calls each function by name, it wires every filter control to a parameter, and it shows sensible “loading” and “no data” states. If a number or chart looks wrong, tell your agent — you don’t have to fix it yourself.
What your agent sets up
Use the exact column names from the function’s schema. Returned field names follow how the function’s query is written — they’re often uppercase (e.g.
TOTAL_REVENUE) but not always, and some can contain spaces. Have your agent read the schema (or one returned row) and match the names exactly. Some numeric values may arrive as text, so the generated code should coerce numbers where it does math.Configuration
new Jedify(config) accepts:
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey | string | Yes | — | Your Jedify API key |
baseUrl | string | No | https://api.jedify.com | API base URL for your environment |
timeout | number | No | 30000 | Request timeout (ms) |
maxRetries | number | No | 3 | Retry attempts for 5xx errors |
headers | object | No | — | Custom headers on every request |
debug | boolean | No | false | Verbose logging |
Methods
listFunctions(filters?)
List the available functions.
getSchema(functionName)
Get one function’s parameters, output columns, and example usage.
call(functionName, parameters?, options?)
Run a function. Returns the rows directly and throws on error.
fetchAll (auto-page through everything), page / limit (manual paging), timeout, signal (cancel).
Error handling
call() throws typed errors the generated code can catch:
| Class | Meaning |
|---|---|
JedifyExecutionError | The query failed to execute |
JedifyValidationError | Invalid parameters |
JedifyHttpError | HTTP error (401, 404, …) |
JedifyTimeoutError | Request timed out |
JedifyNetworkError | Network failure |