MCPTools
environment_create
MCP tool for the environment.create action.
- MCP tool
- environment_create
- Canonical action
- environment.create
- Description
- Create environment
- OAuth scopes
mcp:toolsprojects:write- Org roles
- owner, manager, member
- Project grant
- May require grant
Input (JSON)
Validated with Zod in @loftlancer/api/mcp. Organization context uses organizationId or organizationSlug (MCP tokens do not carry an active-org cookie).
{
"$ref": "#/definitions/environment_create",
"definitions": {
"environment_create": {
"type": "object",
"properties": {
"organizationId": {
"type": "string",
"minLength": 1
},
"organizationSlug": {
"type": "string",
"minLength": 1
},
"projectId": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9 _-]*$"
},
"slug": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"branch": {
"type": "string"
},
"deployedUrl": {
"anyOf": [
{
"anyOf": [
{
"not": {}
},
{
"type": "string",
"format": "uri"
}
]
},
{
"type": "string",
"const": ""
}
]
},
"status": {
"type": "string",
"enum": [
"active",
"inactive",
"building",
"failed"
],
"default": "active"
},
"isProduction": {
"type": "boolean",
"default": false
},
"description": {
"type": "string"
}
},
"required": [
"projectId",
"name"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}Example request
{
"name": "environment_create",
"arguments": {}
}Output
The MCP server returns a single text content block whose body is pretty-printed JSON from the underlying studio tRPC caller (runMcpTool in @loftlancer/api/mcp). Errors surface as tool errors (for example insufficient_scope, organization_required, or validation messages).