# Show database of a web hosting package

> One database of a web hosting package - how to connect, its size.

- Effect: Read - Changes nothing.
- Idempotent: yes
- Stability: beta
- MCP tool: `manitu_webhosting_web_database_get` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/webhosting/web/database/get`
- Needs: `service_webhosting`
- Page: /reference/webhosting/web/database/get/

## MCP tool

`manitu_webhosting_web_database_get`

### Description for the model

Returns one database of a web hosting package of the manitu customer account this connection works in, by site_id and database_id from manitu_webhosting_web_database_list: server type, host, database name and user name - what a CMS or shop is set up with -, description, whether manitu still knows the password, and tables and size as last counted. The password itself is NOT given here (secrets_withheld): the customer finds it in the customer panel.

### Arguments

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `database_id` (integer | string, required) - The database_id from manitu_webhosting_web_database_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_webhosting_web_database_get",
    "arguments": {
      "site_id": 12345,
      "database_id": 12345
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/webhosting/web/database/get`

### Authentication

One of `X-API-Key`, `Authorization: Bearer …` - never more than one in a request.

### Request body

JSON; unknown fields are refused.

- `site_id` (integer | string, required) - The site_id from manitu_webhosting_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `database_id` (integer | string, required) - The database_id from manitu_webhosting_web_database_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)

### Response

In `data`; the rest of the body as on every call.

- `database_id` (integer, required) - The database - what the other database tools take.
- `server_type` (string | null, required) - The kind of database server: mariadb, mysql or postgres; null if it cannot be told right now. (one of `"mariadb"`, `"mysql"`, `"postgres"`, `null`)
- `hostname` (string, required) - The database server to connect to - from the web hosting package's own scripts.
- `name` (string, required) - The name of the database (db<number>).
- `username` (string, required) - The user to connect with (u<number>).
- `description` (string | null, required) - What the customer wrote about it (his description), null if nothing - not its name or user name.
- `password_stored` (boolean, required) - manitu still knows the password. false: the customer had it forgotten - the database keeps it, dumps and copies need a new one (set with password_action regenerate).
- `table_count` (integer | null, required) - How many tables it has, as last counted; null if never counted.
- `data_size_mb` (integer | null, required) - How much data and indexes it holds in MB (rounded down), as reported by the database server when last counted; the files on disk can be larger. null if never counted.
- `counted_at` (string | null, required) - When table_count and data_size_mb were counted. (format `date-time`)
- `created_at` (string | null, required) - When it was created. (format `date-time`)
- `password` (string | null, required) - The password - a secret; null where it is withheld (secrets_withheld) or not stored (password_stored).
- `secrets_withheld` (boolean, required) - The password is left out here (an answer to an agent) - the customer finds it in the customer panel.

### Statuses

- `200` Success.
- `400` The request does not match the declared input schema.
- `401` No credential was presented, or it was not recognised.
- `403` The credential is not permitted to use this operation.
- `500` The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.
- `503` The channel this operation forwards through is unavailable.

### Example

```sh
curl -X POST 'https://api.manitu.de/v1/webhosting/web/database/get' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"site_id":12345,"database_id":12345}'
```

## Example result

```json
{
  "database_id": 12345,
  "server_type": "mariadb",
  "hostname": "server.example.com",
  "name": "example.com",
  "username": "string",
  "description": "Example",
  "password_stored": true,
  "table_count": 1,
  "data_size_mb": 1,
  "counted_at": "2026-10-23T12:00:00+02:00",
  "created_at": "2026-10-23T12:00:00+02:00",
  "password": "correct-horse-battery",
  "secrets_withheld": true
}
```
