# Change description and hostname of a virtual server

> The description and hostname manitu keeps for a vServer – nothing on the server itself changes.

- Effect: Write - Changes the account. Agents ask first.
- Idempotent: yes
- Stability: beta
- MCP tool: `manitu_vserver_set` on https://mcp.manitu.de/mcp
- REST: `POST https://api.manitu.de/v1/vserver/set`
- Needs: `service_vserver`
- Page: /reference/vserver/set/

**Changes the account. Agents say what will happen and wait for an explicit yes before calling it.**

## MCP tool

`manitu_vserver_set`

### Description for the model

Changes the description and/or hostname manitu keeps for a virtual server (vServer), by its vserver_id from manitu_vserver_list - what the customer panel and manitu_vserver_list show. It does not change anything on the server itself (not its operating system's hostname, not its reverse DNS - that is manitu_vserver_ptr_set). Answers the vServer as changed. A hostname that is none is refused.

Provide at least one of: description, hostname.

### Arguments

- `vserver_id` (integer | string, required) - The vserver_id from manitu_vserver_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `description` (string | null) - The customer's description of it, e.g. "shop, production". Left out: unchanged (set) or none (create); null or empty: none. (maxLength `1024`)
- `hostname` (string | null) - Its hostname, e.g. "web1.example.com". Left out: unchanged (set) or none (create); null or empty: none. (maxLength `253`)

### Example

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "manitu_vserver_set",
    "arguments": {
      "vserver_id": 12345,
      "description": "Example"
    }
  }
}
```

## REST

`POST https://api.manitu.de/v1/vserver/set`

### Authentication

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

### Request body

JSON; unknown fields are refused.

Provide at least one of: description, hostname.

- `vserver_id` (integer | string, required) - The vserver_id from manitu_vserver_list - never guess one. (pattern `"^[1-9][0-9]*$"`; minimum `1`)
- `description` (string | null) - The customer's description of it, e.g. "shop, production". Left out: unchanged (set) or none (create); null or empty: none. (maxLength `1024`)
- `hostname` (string | null) - Its hostname, e.g. "web1.example.com". Left out: unchanged (set) or none (create); null or empty: none. (maxLength `253`)

### Response

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

- `vserver_id` (integer, required) - The id of the vServer - what manitu_vserver_get and every route on it take (the same number as service_id).
- `service_id` (integer, required) - The id of the service instance - the same number as the id its own routes take (e.g. vserver_id).
- `service_type` (string, required) - The kind of service, e.g. vserver - its own data is under the key of that name. (one of `"vserver"`, `"other"`)
- `description` (string | null, required) - What the customer wrote about it (his description), null if nothing - not its name or user name.
- `status` (string, required) - Its state as a service, e.g. active. (one of `"active"`, `"provisioning"`, `"suspended"`, `"destroying"`, `"deleted"`)
- `is_configurable` (boolean, required) - It can be changed right now - false e.g. while suspended.
- `plan` (string | null, required) - The plan, e.g. "vServer M".
- `vserver` (object, required) - What is the vServer's own.
  - `vserver.hostname` (string | null, required) - Its hostname as manitu keeps it, if set.
  - `vserver.power_state` (string | null, required) - e.g. running or stopped - as manitu last saw it: updated with every workflow on the server and once a day, so a shutdown from inside the server may not show yet; null if unknown. (one of `"stopped"`, `"running"`, `"suspended"`, `"installing"`, `null`)
  - `vserver.ipv4_address` (string | null, required) - Its IPv4 address.
  - `vserver.ipv6_address` (string | null, required) - Its IPv6 address.

### 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/vserver/set' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"vserver_id":12345,"description":"Example"}'
```

## Example result

```json
{
  "vserver_id": 12345,
  "service_id": 12345,
  "service_type": "vserver",
  "description": "Example",
  "status": "active",
  "is_configurable": true,
  "plan": "string",
  "vserver": {
    "hostname": "server.example.com",
    "power_state": "stopped",
    "ipv4_address": "192.0.2.10",
    "ipv6_address": "2001:db8::10"
  }
}
```
