> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jedify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Semantic functions

> Reusable, parameterized queries your agent builds and your app calls.

A **semantic function** is a reusable, parameterized query — saved once, then called by name. You describe the dashboard you want in plain language; your agent creates the functions and writes the app code that calls them. No SQL or coding on your part.

The function's query is built once, so at runtime it's fast and returns the same answer for the same inputs — safe to put behind a live dashboard. Creating a function uses AI; calling it does not.

## How it works

<Steps>
  <Step title="Describe">
    Tell your agent the metrics, breakdowns, and filters you need.
  </Step>

  <Step title="Build">
    Your agent reuses existing functions where it can, and for anything missing it asks Jedify a question, confirms the result, and saves it as a function.
  </Step>

  <Step title="Run">
    The published app calls the functions by name through the [SDK](/mcp/builder/sdk-reference) and renders the data.
  </Step>
</Steps>

See [Examples](/mcp/builder/examples) for a full walkthrough.

## What your agent can filter on

A function exposes the values you filter by as parameters — your dashboard's filter controls:

| Filter type                                                    | Example              |
| -------------------------------------------------------------- | -------------------- |
| Category (department, office, region, manager, course, status) | `"R&D"`              |
| Number                                                         | `100`                |
| Yes / no                                                       | `true`               |
| Date                                                           | `"2026-01-01"`       |
| List (multi-select)                                            | `["R&D", "Finance"]` |

Tell your agent which filters should be **optional** (blank means "all") and which are required. Most should be optional.

<Note>
  **One breakdown, one function.** A function has a fixed shape. "Completion by department" and "completion by manager" are two functions — the filters inside a function are flexible, but the breakdown is not. Ask for one function per breakdown.
</Note>

### Dates

Date-range filters are always required — a dashboard can't leave the date blank to mean "all time."

> **Steer it:** *"Default the date range to year-to-date, and add an 'All time' option that sends 2000-01-01 through today."*

## Validation

When your agent saves a function, Jedify runs it once to validate. A function is either **active** (ready) or **failed validation** (saved with the error, not callable). If one fails, ask your agent to re-check the question and recreate it.

## Naming

Functions use names like `_COMPLETION_BY_DEPARTMENT` — uppercase, leading underscore. Your agent picks them; you'll see them in the function list and app code.

<Note>
  Published apps share one API key across all viewers — choose its access level before you build. See [Authentication](/mcp/authentication).
</Note>
