Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fmcp-server%2Ftools%2Freference.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fmcp-server%2Ftools%2Freference.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Reference tools

The MCP server provides foundational tools for understanding and querying your data effectively.

### Explore DataPrime commands and functions[​](#explore-dataprime-commands-and-functions "Direct link to Explore DataPrime commands and functions")

Use the `list_dataprime_commands` tool to browse the available DataPrime commands and functions, and the `show_dataprime_command_details` tool to see the syntax, description, and category for a specific one. These tools help AI agents construct correct queries with DataPrime, Coralogix's structured query language for logs, traces, and metrics. They are based on the [DataPrime Reference](https://coralogix.com/docs/docs/dataprime/introduction/welcome-to-the-dataprime-reference/.md).

Explore the relevant commands **before** running queries with `query_dataprime` and `query_promql_range` to ensure correct syntax and interpretation.

**`list_dataprime_commands` parameters:**

| Name   | Required | Type   | Description                                                                   |
| ------ | -------- | ------ | ----------------------------------------------------------------------------- |
| `kind` | No       | enum   | One of `all` (default), `commands`, or `functions`.                           |
| `name` | No       | string | Case-insensitive substring to filter the catalog by command or function name. |

**`show_dataprime_command_details` parameters:**

| Name   | Required | Type   | Description                                             |
| ------ | -------- | ------ | ------------------------------------------------------- |
| `kind` | Yes      | enum   | One of `all`, `commands`, or `functions`.               |
| `name` | Yes      | string | The exact command or function name to show details for. |

### Discover fields with `search_for_fields`[​](#discover-fields-with-search_for_fields "Direct link to discover-fields-with-search_for_fields")

Use the `search_for_fields` tool to discover the log and span field paths ([keypaths](https://coralogix.com/docs/docs/dataprime/user-guide/foundations/understanding-logs/.md): `$d`, `$l`, `$m`) in your data before writing complex queries. Search by field description, by an example value, or by a batch of both—up to five searches per call.

**Example:**

```
{

  "search_items": [

    { "description": "http status code" },

    { "value": "payment-service" }

  ],

  "source": "logs"

}
```

**Parameters:**

| Name           | Required | Type  | Description                                                                                                                                                                              |
| -------------- | -------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search_items` | Yes      | array | Up to five search items. Each item has either a `description` (semantic search over field descriptions) or a `value` (case-insensitive substring match on example values), but not both. |
| `source`       | No       | enum  | One of `logs` (default) or `spans`.                                                                                                                                                      |

**Helpful hints:**

* Use `description` searches to find fields by meaning, and `value` searches to find which field contains a known value.
* To discover metrics instead of log or span fields, use [`search_relevant_metrics`](https://coralogix.com/docs/docs/user-guides/mcp-server/tools/metrics/.md).

### Discover datasets[​](#discover-datasets "Direct link to Discover datasets")

Beyond `source logs` and `source spans`, you can query named datasets—both Coralogix system datasets (`system/...`) and your own user-defined datasets—with [DataPrime](https://coralogix.com/docs/docs/dataprime/introduction/welcome-to-the-dataprime-reference/.md). Use these tools to discover which named sources are available and to inspect a system dataset's schema before querying it. Both tools are available on MCP server v2.

Use the `list_datasets` tool to list the dataset sources available for DataPrime queries. This tool takes no parameters and returns a JSON string with:

* `alwaysAvailableSources` — the built-in sources `source logs` and `source spans`.
* `datasetCounts` — per-type `returned` and `total` counts for `system` and `user` datasets.
* `truncated` — `true` when more datasets exist than were returned (each type is capped at 50 results).
* `datasets` — an array of dataset entries. Each has a `type` (`system` or `user`), a `source` you can query with `source <name>`, and type-specific metadata such as `description` and `queryEnabled` (system) or `writeEnabled` (user).

Use the `get_system_dataset_info` tool after `list_datasets` when you want to understand what a specific system dataset contains before querying it.

**Parameters:**

| Name      | Required | Type   | Description                                                    |
| --------- | -------- | ------ | -------------------------------------------------------------- |
| `dataset` | Yes      | string | A single system dataset path, such as `system/engine.queries`. |

It returns a JSON string with the dataset `source`, its `description`, optional `additional_context_markdown` guidance, and the dataset `schema`.

### Get the current time with `get_datetime`[​](#get-the-current-time-with-get_datetime "Direct link to get-the-current-time-with-get_datetime")

Use the `get_datetime` tool to retrieve the current date and time. This is useful for constructing time-bounded queries when you need a reference to the present moment.
