create_variable

Create a new variable under a product.

Create a new variable under a product.

Writes data · Calls external systems.

Parameters

FieldTypeRequiredDescription
acknowledgebooleanNoReset edit budget after user approval
default_valuestringYesDefault value; for choice, comma-separated allowed options
descriptionstringNoOptional but RECOMMENDED — explain what the variable is for. A short sentence (e.g. "Production database hostname" or "Stripe webhook API key") helps future agents disambiguate it from similarly-named variables.
groupnumberNoOptional: variable group id (omit for a global variable)
namestringYesVariable name (alphanumeric + underscore)
productstringYesProduct slug
typestring (single | secret | choice)Yessingle | secret | choice

Example arguments

Illustrative arguments an agent supplies when calling this tool:

{
  "product": "string",
  "name": "string",
  "type": "single",
  "default_value": "string"
}

Description

Type is one of:
  - "single" — scalar value in default_value
  - "secret" — scalar value; platform masks it on read
  - "choice" — default_value is a comma-separated list of allowed values

Pass group=<id> for a group-scoped variable; omit it for a global. The tool auto-fans variable_values to one entry per variant of the group, all initialised to default_value. Tune individual variants afterwards with set_variable_value.

A description is optional but RECOMMENDED — future agents (and humans) rely on it to disambiguate variables that share similar names but differ in purpose. A single short sentence is enough.

Consumes one slot of the per-session variable edit budget. Pre-flight name conflicts with check_variable_name to avoid wasted creates.

What's next?

All MCP tools

Browse the full tool reference by category.

Connect a client

Point Claude, Cursor, or Claude Code at the server.

Last updated on