# Reference tools

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

### Get acquainted with DataPrime

Use the `read_dataprime_intro_docs_v1` tool to learn the fundamentals of DataPrime, Coralogix's structured query language for logs, traces, and metrics. This tool is based on the [DataPrime Reference](https://coralogix.com/docs/dataprime/index.md) and helps AI agents understand the syntax and patterns needed to construct effective queries.

Run this tool **before** using others like `get_logs_v1` and `get_traces_v1` to ensure correct syntax and interpretation.

### Explore available fields with `get_schemas_v1`

Use the `get_schemas_v1` tool to discover the structure of your log, trace, or metric data sets. This tool returns field names (keypaths) along with optional example values, making it easier to construct accurate and relevant queries.

List properties (keypaths) for the given data set types (logs and spans) and [keypaths](https://coralogix.com/docs/dataprime/beginners-guide/how-data-is-represented-in-dataprime/) (`$d`, `$l`, `$m`). This is useful for understanding the structure of your data before writing complex queries.

**Example:**

```js
{
  "datasetType": "DATASET_TYPE_LOGS",
  "startDate": "2024-01-01T00:00:00Z",
  "endDate": "2024-01-07T00:00:00Z",
  "includedExamples": 3,
  "keypathFilters": "http"
}
```

**Parameters:**

| Name               | Required | Type              | Description                                                                                |
| ------------------ | -------- | ----------------- | ------------------------------------------------------------------------------------------ |
| `datasetType`      | Yes      | enum              | One of `DATASET_TYPE_LOGS`, `DATASET_TYPE_SPANS`, `DATASET_TYPE_METRICS`                   |
| `startDate`        | Yes      | string (ISO 8601) | Start of the query time range. Allows dates up to three months back from the current date. |
| `endDate`          | Yes      | string (ISO 8601) | End of the query time range. Allows dates up to three months back from the current date.   |
| `scopes`           | No       | array             | Scopes to query: `"$d"`, `"$l"`, `"$m"`. Defaults to all.                                  |
| `limit`            | No       | number            | Max number of keypaths to return (default: 50, max: 1000).                                 |
| `includedExamples` | No       | number            | Number of example values per keypath.                                                      |
| `keypathFilters`   | No       | string            | Fuzzy search string to filter keypaths.                                                    |

**Helpful hints:**

- We recommend querying a time range of at least one week.
- The tool will only display a subset of results, so you can use the `keypathFilters` option to run a fuzzy search and retrieve more targeted keypaths.

### 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.
