Skip to main content
Glama

Create production instance

create_production_instance
Destructive

Create the production instance for an application on a domain the user owns, copying configuration from the development instance by default (the first step of clerk deploy). This cannot be undone. Returns the new instance, the DNS records to add at the domain's DNS provider, and the next steps. The secret key is removed, or returned as encrypted_secret_key when recipient_public_key is set.

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": {
      "application_id": "<application_id>",
      "domain": "<domain>",
      "confirm": "<confirm>"
    },
    "name": "create_production_instance"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainYesProduction domain you own, e.g. example.com.
confirmYesConfirms the user approved creating this production instance, which cannot be undone.
application_idYesClerk application ID (app_…).
clone_instance_idNoInstance to clone configuration from. Defaults to the development instance.
recipient_public_keyNoRSA public key to encrypt secret keys to: a JWK, or base64, base64url, or hex SubjectPublicKeyInfo DER, with a 2048 to 4096-bit modulus and exponent 65537. Each secret key then comes back as encrypted_secret_key, unpadded base64url RSA-OAEP ciphertext with SHA-256 for OAEP and MGF1 and an empty label, which only the matching private key can decrypt.

Output Schema

NameRequiredDescriptionDefault
instanceYes
next_stepsYes
dns_recordsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true. Creating a production instance cannot be undone."New value: +"Confirms the user approved creating this production instance, which cannot be undone."
    • addedInput schema / properties / recipient_public_key
      Added value: +{
      +  "description": "RSA public key to encrypt secret keys to: a JWK, or base64, base64url, or hex SubjectPublicKeyInfo DER, with a 2048 to 4096-bit modulus and exponent 65537. Each secret key then comes back as encrypted_secret_key, unpadded base64url RSA-OAEP ciphertext with SHA-256 for OAEP and MGF1 and an empty label, which only the matching private key can decrypt.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "dns_records": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "host": {
      +            "type": "string"
      +          },
      +          "record_type": {
      +            "type": "string"
      +          },
      +          "required": {
      +            "type": "boolean"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "record_type",
      +          "host",
      +          "value",
      +          "required"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "instance": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "active_domain": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": {},
      +              "properties": {
      +                "dns_targets": {
      +                  "items": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "host": {
      +                        "type": "string"
      +                      },
      +                      "record_type": {
      +                        "type": "string"
      +                      },
      +                      "required": {
      +                        "type": "boolean"
      +                      },
      +                      "value": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "record_type",
      +                      "host",
      +                      "value",
      +                      "required"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "frontend_api_url": {
      +                  "type": "string"
      +                },
      +                "id": {
      +                  "type": "string"
      +                },
      +                "name": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "name",
      +                "frontend_api_url"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "publishable_key": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "publishable_key"
      +      ],
      +      "type": "object"
      +    },
      +    "next_steps": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "instance",
      +    "dns_records",
      +    "next_steps"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive=true, idempotent=false and readOnly=false, and the description adds substantial context beyond them: defaults to cloning the development instance, cannot be undone, and the returned secret key is either stripped or encrypted when recipient_public_key is supplied. It also tells the agent what comes back (the instance, DNS records, next steps), which shapes how the result should be handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the action and scope, then the irreversibility caveat, then the return/secret-handling note. No filler and no repetition of schema field lists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, multi-parameter creation tool with an output schema, the description covers precondition (domain ownership), irreversibility, cloning default, secret-key handling, and return shape. Nothing an agent needs in order to call it correctly or interpret the result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds the default behavior for clone_instance_id (falls back to the development instance) and the output consequence of recipient_public_key (secret returned as encrypted_secret_key). That is meaning beyond the schema, though the encryption details themselves remain in the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (create the production instance) plus scope (on a domain the user owns, cloning config from the development instance). It is clearly distinct from sibling write tools like create_application or put_instance_config, and it names the deploy step it belongs to.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Frames when this is used ('the first step of `clerk deploy`') and states the precondition that the domain belongs to the user, plus the irreversibility that motivates the confirm flag. It does not explicitly name a when-not condition or point to sibling tools such as check_domain_dns for the follow-up DNS step, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources