create_egg_variable
Add environment variables to game server eggs in Pterodactyl panels. Define custom settings like ports, configurations, and server parameters with validation rules for admin control.
Instructions
Add a new environment variable to an egg (admin action). The 'rules' field uses Laravel validation syntax (e.g., 'required|string|max:20'). Use list_nests and list_eggs to find the nest_id and egg_id. Requires Application API key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nest_id": "<nest_id>",
"egg_id": "<egg_id>",
"name": "<name>",
"description": "<description>",
"env_variable": "<env_variable>",
"default_value": "<default_value>",
"user_viewable": "<user_viewable>",
"user_editable": "<user_editable>",
"rules": "<rules>"
},
"name": "create_egg_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nest_id | Yes | Nest ID that contains the egg (from list_nests) | |
| egg_id | Yes | Egg ID to add the variable to (from list_eggs) | |
| name | Yes | Display name for the variable (e.g. 'Server Port') | |
| description | Yes | Description of what this variable controls | |
| env_variable | Yes | Environment variable key (e.g. 'SERVER_PORT') | |
| default_value | Yes | Default value for the variable (e.g. '25565') | |
| user_viewable | Yes | Whether users can see this variable in the panel | |
| user_editable | Yes | Whether users can modify this variable in the panel | |
| rules | Yes | Laravel validation rules (e.g. 'required|string|max:20', 'required|integer|between:1,65535') |