---
title: Metadata
description: "--- [Metadata](https://namazustudios.com/glossary/metadata/) in Elements provides a flexible way to define and store structured information. It consists of two parts: 1. **[Metadata](https://namazustudios.com/glossary/metadata/) Specs** – define the *schema* (types and structure). 2. **[Metadata](https://namazustudios.com/glossary/metadata/) Objects** – store actual data, validated against a spec.…"
url: "https://namazustudios.com/docs/namazu-elements-core/schemas-and-metadata-specifications/"
updated: "2026-08-13"
category: Namazu Elements Core Features
---

# Metadata

---

[Metadata](https://namazustudios.com/glossary/metadata/) in Elements provides a flexible way to define and store structured information.
It consists of two parts:

1. **[Metadata](https://namazustudios.com/glossary/metadata/) Specs** – define the *schema* (types and structure).
2. **[Metadata](https://namazustudios.com/glossary/metadata/) Objects** – store actual data, validated against a spec.

This lets you enforce consistency across different parts of your game/[Application](https://namazustudios.com/glossary/application/), while still allowing for flexible definitions.

---

## [Metadata](https://namazustudios.com/glossary/metadata/) Specs

A **[Metadata](https://namazustudios.com/glossary/metadata/) Spec** is a schema that describes what a [Metadata](https://namazustudios.com/glossary/metadata/) object should look like.

### Structure

A spec has:

- **[name](https://namazustudios.com/glossary/name/)**: A unique identifier for the spec.
- **properties**: A list of fields, each with a type and optional values.

### Property Types

Each property has a **[name](https://namazustudios.com/glossary/name/)** and a **type**. Four types are supported:

| Type | Description | Extras |
| --- | --- | --- |
| **STRING** | A text field | Optional placeholder value |
| **NUMBER** | A numeric field (int or float) | Optional placeholder value |
| **BOOLEAN** | A true/false value | – |
| **OBJECT** | A nested structure containing its own properties | Properties can be any of the four types |

**Example Spec**

```
{
  "name": "WeaponSpec",
  "properties": [
    { "name": "damage", "type": "NUMBER", "placeholder": 10 },
    { "name": "rarity", "type": "STRING", "placeholder": "common" },
    { "name": "isLegendary", "type": "BOOLEAN" },
    {
      "name": "stats",
      "type": "OBJECT",
      "properties": [
        { "name": "range", "type": "NUMBER", "placeholder": 100 },
        { "name": "weight", "type": "NUMBER" }
      ]
    }
  ]
}
```

---

## [Metadata](https://namazustudios.com/glossary/metadata/) Objects

A **[Metadata](https://namazustudios.com/glossary/metadata/) Object** is an actual piece of data created based on a [Metadata](https://namazustudios.com/glossary/metadata/) Spec.

### Structure

A [Metadata](https://namazustudios.com/glossary/metadata/) object has:

- **[name](https://namazustudios.com/glossary/name/)**: A human-readable identifier.
- **access level**: Controls who can see this object:
  - **Unprivileged** – visible to anyone.
  - **[User](https://namazustudios.com/glossary/user/)** – visible only to logged-in users.
  - **Superuser** – visible only to administrators.
- **spec**: The [Metadata](https://namazustudios.com/glossary/metadata/) Spec that defines its structure.
- **data**: A map of values that follows the rules from the spec.

### Example Object

Using the `WeaponSpec` defined earlier:

```
{
  "name": "Excalibur",
  "accessLevel": "User",
  "spec": "WeaponSpec",
  "data": {
    "damage": 50,
    "rarity": "legendary",
    "isLegendary": true,
    "stats": {
      "range": 150,
      "weight": 5
    }
  }
}
```

---

## Scoping

[Metadata](https://namazustudios.com/glossary/metadata/) objects can be attached **globally** or **scoped** to specific domains within Elements:

- **Global** – accessible across the entire [Application](https://namazustudios.com/glossary/application/).
- **[User](https://namazustudios.com/glossary/user/) [Profile](https://namazustudios.com/glossary/profile/)** – [Metadata](https://namazustudios.com/glossary/metadata/) specific to a given [User](https://namazustudios.com/glossary/user/).
- **[Application](https://namazustudios.com/glossary/application/)** – [Metadata](https://namazustudios.com/glossary/metadata/) tied to the app instance.
- **Items** – [Metadata](https://namazustudios.com/glossary/metadata/) attached to inventory/game objects.

This makes [Metadata](https://namazustudios.com/glossary/metadata/) a flexible tool for storing structured information at different levels of your system.

---

## Access Control

When querying [Metadata](https://namazustudios.com/glossary/metadata/) objects, Elements automatically filters results based on the **[User](https://namazustudios.com/glossary/user/)’s access level**:

- **Unprivileged** users only see `Unprivileged` [Metadata](https://namazustudios.com/glossary/metadata/).
- **Users** see both `Unprivileged` and `User` [Metadata](https://namazustudios.com/glossary/metadata/).
- **Superusers** see everything.

This ensures sensitive or internal [Metadata](https://namazustudios.com/glossary/metadata/) is never leaked to unintended clients.

---

## Common Use Cases

- Defining **[Item](https://namazustudios.com/glossary/item/) properties** (weapons, gear, consumables).
- Creating **[Application](https://namazustudios.com/glossary/application/)-level configs**.
- Attaching **custom [Profile](https://namazustudios.com/glossary/profile/) attributes** to users.
- Storing **dynamic game data** (quests, NPC definitions, world states).

---

## Summary

- **Specs** define *what* [Metadata](https://namazustudios.com/glossary/metadata/) looks like.
- **Objects** hold the actual *data*, validated against a spec.
- **Access levels** control visibility.
- **Scoping** lets you attach [Metadata](https://namazustudios.com/glossary/metadata/) where it’s needed — global, [User](https://namazustudios.com/glossary/user/), app, or items.
