# Get

## Get Record From Tag <a href="#from-tag" id="from-tag"></a>

{% code lineNumbers="true" %}

```javascript
db.get('tag')
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The Record's tag</td><td>String</td><td>true</td></tr></tbody></table>

## Read <a href="#content" id="content"></a>

{% tabs %}
{% tab title="DB level" %}

```javascript
await db.read('tag')
```

{% endtab %}

{% tab title="Record level" %}
{% code lineNumbers="true" %}

```javascript
await db.get('tag').read()
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Get Path <a href="#path" id="path"></a>

{% tabs %}
{% tab title="Locate method" %}
{% code lineNumbers="true" %}

```javascript
db.locate('tag')
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>Record's tag</td><td>string</td><td>true</td></tr></tbody></table>
{% endtab %}

{% tab title="Path property" %}
{% code lineNumbers="true" %}

```javascript
db.get('tag').path
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Get Tag <a href="#tag" id="tag"></a>

{% code lineNumbers="true" %}

```javascript
db.get('tag').tag
```

{% endcode %}

## Exists <a href="#exists" id="exists"></a>

{% hint style="info" %}
This will only return `true` or `false`.
{% endhint %}

{% code lineNumbers="true" %}

```javascript
await db.has('tag')
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>tag</td><td>The tag to check for</td><td>String</td><td>true</td></tr></tbody></table>

## Get All Records

{% code lineNumbers="true" %}

```javascript
await db.getAll({tagOnly:false, limit:10, filter})
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>options.tagOnly</td><td>Set to true to return an array of tags instead of Records</td><td>Boolean</td><td>false</td></tr><tr><td>options.limit</td><td>Max results</td><td>Number</td><td>false</td></tr><tr><td>options.filter</td><td>Filter results</td><td>Function</td><td>false</td></tr></tbody></table>

## Find Record

Similar to `getAll`, but returns the first match.

{% code lineNumbers="true" %}

```javascript
await db.find(tag => {})
```

{% endcode %}

<table><thead><tr><th>Parameter</th><th>About</th><th>Type</th><th data-type="checkbox">Required</th></tr></thead><tbody><tr><td>filter</td><td>Filter results</td><td>Function</td><td>false</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://db.coolstone.dev/4/core/get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
