Loftlancer Docs
MCPTools

variable_create

MCP tool for the variable.create action.

MCP tool
variable_create
Canonical action
variable.create
Description
Create variable
OAuth scopes
mcp:toolsvariables: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/variable_create",
  "definitions": {
    "variable_create": {
      "type": "object",
      "properties": {
        "organizationId": {
          "type": "string",
          "minLength": 1
        },
        "organizationSlug": {
          "type": "string",
          "minLength": 1
        },
        "environmentId": {
          "type": "string",
          "format": "uuid"
        },
        "key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
        },
        "value": {
          "type": "string",
          "maxLength": 100000
        },
        "type": {
          "type": "string",
          "enum": [
            "secret",
            "config"
          ]
        },
        "note": {
          "type": "string",
          "maxLength": 2000
        }
      },
      "required": [
        "environmentId",
        "key",
        "value"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Example request

{
  "name": "variable_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).