> ## Documentation index
> Fetch the complete documentation index at: [llms.txt](../llms.txt)
> Use this file to discover all available pages before exploring further.

# Explore tools

Four tools to build a filtered dataset from the knowledge base, the same way Explore does in Studio, and download it.

Explore datasets come straight from the knowledge base, so they don't use credits. The dataset is saved to a project in Studio, where the user can open it, add columns, or set up monitoring. [Explore the knowledge base](explore.md)

## The order to call them in

1. `explore_get_filters` to see the anchors, columns, filters, allowed values, and row limits.
2. `explore_search_filter_values` for every term the user gave, like PD-1, NSCLC, or ADC. Pass the values it returns unchanged. If a term matches more than one value, ask the user which one.
3. `explore_build_dataset` with the resolved filters. Show the user the counts and preview.
4. Ask whether they want the full dataset. If they do, `explore_download_dataset`, as CSV unless they asked for JSON. Use this tool, not `download_dataset_csv`, for Explore datasets: its CSV matches a Studio export column for column.

### `explore_get_filters`

List the dataset anchors (the kind of record each row is), the columns you can pick, the filters, their fixed allowed values, and the row limits. Call it before building a dataset.

*No inputs.*

### `explore_search_filter_values`

Turn a user’s term into the canonical filter values Explore uses. Never guess IDs.

| Input | Type | Notes |
| --- | --- | --- |
| `category` (required) | string | The filter category, from `explore_get_filters` |
| `query` (required) | string | The user’s term, such as "PD-1" |
| `limit` | integer | Default 20 |

### `explore_build_dataset`

Build and save a dataset from resolved filter values. Returns counts, columns, a short preview, download handles, any row-cap warnings, and a link to the dataset in Studio.

| Input | Type | Notes |
| --- | --- | --- |
| `anchor` (required) | string | The kind of record each row is, from `explore_get_filters` |
| `filters` (required) | object | Filter category to a list of values, each with the `label` and the `entity_guid` or `entity_guids` returned by `explore_search_filter_values` |
| `columns` | string[] | The columns to include. Omit for the defaults. |
| `title` | string | A name for the dataset |
| `preview_rows` | integer | Default 5 |
| `generate_anyway` | boolean | Default false. Set to true to build the dataset after a row-cap warning. |

### `explore_download_dataset`

Download the full saved dataset. CSV returns a short-lived download link with the same columns as a Studio export. JSON returns every row, which makes a large result for big datasets.

| Input | Type | Notes |
| --- | --- | --- |
| `project_id` (required) | string | From `explore_build_dataset` |
| `dataset_id` (required) | string | From `explore_build_dataset` |
| `format` | string | `csv` (default) or `json` |

## Related

- [Explore the knowledge base](explore.md): Filter the records Sleuth works from and build your own dataset, with no credits.
- [Knowledge base lookup tools](tools-knowledge-base.md): Fifteen tools to resolve drugs, companies, indications, and trials to Sleuth IDs, read their details, and follow their links to deals, targets, and programs.
- [Datasets and charts tools](tools-datasets.md): Seven tools to read the datasets and charts a run builds: page through rows, download CSV, compare versions, and get charts as specs or SVG.

*Updated November 9, 2026.*
