Skip to main content
Query custom elastic datasets — user-defined data structures with flexible schemas for tracking any type of operational data beyond the standard emission categories. Each dataset has its own field definitions and records, and can optionally extend a native Dcycle entity (facilities, vehicles, etc.). In the app they appear as My categories. The tools below read datasets; the write tools create, edit and delete datasets, fields and records.
Elastic data lives on the internal /v2 API, which only accepts a user session. These tools work when the MCP server is connected over OAuth (remote mode), not with a plain DCYCLE_API_KEY.

list_datasets

List all elastic datasets for the organization. Parameters: Example response:
Key response fields:

get_dataset

Get a dataset by ID with its full field definitions (schema). Parameters: Example response:

query_dataset

Query records from a dataset with pagination, optional sorting, and optional filtering. Parameters:
Each filters item is field_key:op:value. Operators allowed depend on the field’s data_type:Value encoding:
  • Scalar ops: amount:gt:100, status:eq:open
  • bt/nb: JSON 2-array → amount:bt:[100,200]
  • in/ni: JSON array → status:in:["open","closed"]
  • Shortcut field_key:value (no op) = contains for text, exact otherwise
  • *:value = free-text search across all fields
A clause referencing an unknown field, an operator not allowed for the field’s type, or an uncoercible value is silently ignored (no error). Call get_dataset first so you use real field keys and valid operators.
Example response:
Records are stored as JSONB — the data object uses the field key values from the dataset schema. Call get_dataset first to understand what fields exist and their types. Reference-field cells hold the target record’s UUID (a refs map in the response resolves them to display text when present).

get_dataset_record

Get a single record from a dataset by its ID (use query_dataset to find record IDs first). Parameters: Example response:

list_dataset_groups

List the organization’s dataset groups (folders that organize datasets in the UI). Parameters: Example response:

list_project_datasets

List the elastic datasets associated with a specific project. Parameters: Example response:
Example prompts:

Write tools

Write tools are annotated readOnlyHint: false. The delete tools are also annotated destructiveHint: true, so AI assistants ask you before calling them.

create_dataset

Create an empty dataset. Add its columns with add_dataset_fields, then load rows with create_dataset_records.

update_dataset

Rename a dataset or change its description. Unset values are left untouched.

delete_dataset

Permanently delete a dataset together with all its fields and records. This cannot be undone.

add_dataset_fields

Add up to 200 fields (columns) to a dataset. Returns the dataset with its full field list. Each field object takes:

update_dataset_field

Update one field. Only the arguments you pass change, and the field’s key never changes.
For a select field, options.values must keep every value already in use. To rename a value, add the new one, update the records with update_dataset_record, then remove the old one.

delete_dataset_field

Permanently delete a field and its value in every record of the dataset.

create_dataset_records

Create up to 100 records per call. Each record is an object keyed by field key (not display name), for example {"site": "Madrid", "amount": 120.5, "measured_on": "2026-01-31"}. Values are validated against each field’s type; a quantity_unit value is {"value": "12.5", "unit": "kg"}. Rows are created one by one, so a bad row doesn’t block the rest:

update_dataset_record

Change values of one record. Only the given field keys change; a key set to null clears it.

delete_dataset_record

Permanently delete one record. Example prompts:

Workflow

  1. Discover datasets — list_datasets (or list_project_datasets for a project) to see available datasets and record counts; list_dataset_groups for how they’re organized
  2. Understand schema — get_dataset to see field keys, data_types, and options (needed to build filters/sort)
  3. Query records — query_dataset with filters/sort to retrieve and narrow the data; use get_dataset_record for a single record by ID
  4. Cross-reference — If entity_type is set, use the corresponding tool (e.g. list_facilities) to link records to native entities
  5. Build or change data — create_dataset → add_dataset_fields → create_dataset_records; update_* to edit; delete_* only after confirming with the user

CLI: My Categories

The same operations from the terminal with dcy elastic

Custom KPIs

KPI definitions that can be built on elastic datasets

Files

File uploads that can populate elastic datasets