# Metadata Schemas MCP Tools

> The MCP tools the SOAT server exposes for the Metadata Schemas module, with the arguments each tool takes.

# Metadata Schemas

MCP tools for the Metadata Schemas module. See the [Metadata Schemas module docs](/docs/modules/metadata-schemas) for permissions and data model.

### `list-metadata-schemas`

List metadata schemas

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `project_id` | `string` | no | Project public ID (proj_ prefix) |
| `resource_type` | `string` | no | Return only the declarations governing this resource. |
| `limit` | `number` | no | Results per page. Above the maximum it is clamped, and `limit` in the response reports the page served; below 1 or not an integer it is `400 VALIDATION_FAILED`. |
| `offset` | `number` | no | Results to skip. Negative or not an integer it is `400 VALIDATION_FAILED`. |

### `create-metadata-schema`

Declare a metadata schema

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `project_id` | `string` | no | Project the declaration governs. Optional for a project-scoped API key, which supplies it. |
| `resource_type` | `string` | yes | The resource whose metadata this declaration governs. A type appears here once its write path reads the registry, so a declaration always has a door that enforces it. |
| `path_prefix` | `string` | no | The selector a `document` declaration must carry: the directory it governs. |
| `schema` | `object` | yes | A JSON Schema. Its keywords are its own vocabulary and are stored as written. |

### `validate-metadata`

Check metadata against what is declared

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `project_id` | `string` | no | — |
| `path` | `string` | yes | The path the document would be filed at, which decides which declaration governs it. |
| `metadata` | `any` | no | The bag to judge. Absent or `null` is judged as an empty bag. |

### `get-metadata-schema`

Get a metadata schema

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `metadata_schema_id` | `string` | yes | — |

### `update-metadata-schema`

Update a metadata schema

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `metadata_schema_id` | `string` | yes | — |
| `path_prefix` | `string` | no | The declaration's new selector. |
| `schema` | `object` | no | Replaces the declared JSON Schema. |

### `delete-metadata-schema`

Delete a metadata schema

#### Arguments

| Argument | Type | Required | Description |
| -------- | ---- | -------- | ----------- |
| `metadata_schema_id` | `string` | yes | — |
