# Metadata Tags

Metadata tags are temporary storage devices. They will be cleared when a server restarts, and aren't saved into a database, which means they are perfect for short-term, you don't even have to worry about deleting them if you don't want to!

However, these do have some limitations:

* They are limited to a single value: you cannot set a metadata tag to a list or more than one object.
* Metadata tags are required to be attached to an entity (players included) or a block. You cannot set a tag without linking an object, like you would with a variable.
* You cannot add, subtract, or otherwise manipulate metadata tags outside of setting or deleting them: `add 1 to (player's metadata tag "count)` will not work; you'll need to `set (player's metadata tag "count) to (player's metadata tag "count) + 1`.

Syntax: `%holder%'s metadata tag %string%` or `metadata tag %string% of %holder%`

{% hint style="warning" %}
Metadata tags are a little hard for Skript to work with without the use of parentheses, so you should always place a metadata tag between parentheses.

See the [Parentheses page](/syntask/optimisations/parentheses.md) to learn how parentheses can make your code faster and easier to read and run.
{% endhint %}

Examples:

{% code overflow="wrap" lineNumbers="true" %}

```python
set (player's metadata tag "term:1") to 34
set (player's metadata tag "term:2") to 82
broadcast "%(player's metadata tag "term:1") + (player's metadata tag "term:2")%"
```

{% endcode %}

{% code overflow="wrap" lineNumbers="true" %}

```python
set (event-entity's metadata tag "location") to event-location
```

{% endcode %}


---

# 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://x8ight.gitbook.io/syntask/storage/metadata-tags.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.
