Skip to main content
Glama

delete_custom_variable

DestructiveIdempotent

Remove a custom variable from the workspace registry. Values already stored on leads are NOT deleted, so re-creating the same token restores full personalization. Call get_custom_variable_usage first to see which campaigns reference it. Refused with 409 variable_in_use while an active (non-draft) campaign's sequence still references the token, because deleting it would quietly strip a phrase from messages already going out. The intended way past that is replace_with: it repoints every reference in every campaign sequence at another variable and then deletes this one, in a single transaction, and the response reports campaignsUpdated. Prefer that over hand-editing sequences. If the user actually wants a different NAME rather than a different variable, use rename_custom_variable, not delete-and-recreate.

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": {
      "custom_variable_id": "<custom_variable_id>"
    },
    "name": "delete_custom_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault
replace_withNoToken (NAME, not id) of the variable every sequence should reference instead, applied before the delete. It must already exist (a built-in counts); anything else returns 400 replacement_unknown, since pointing sequences at something that also resolves to nothing would just move the breakage.
custom_variable_idYesId of the custom variable (from list_custom_variables).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds what the annotations cannot: stored lead values survive and re-creating the token restores personalization, the 409 variable_in_use guard applies only to non-draft campaign sequences, and replace_with is applied atomically in a single transaction with campaignsUpdated in the response. That is material context for a destructive call.

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

Conciseness4/5

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

The most important fact (values are not deleted) is front-loaded, and the error/recovery path follows logically. It runs six sentences and repeats replace_with's role slightly between the body and the schema, but every sentence carries a decision-relevant fact rather than filler.

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 two-parameter destructive tool with no output schema, the definition covers the outcome of the delete, the blocking precondition, the recovery mechanism, the error identifiers, and the response field. Nothing an agent needs in order to call it safely or explain 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 both parameters are already documented, including replace_with's token-not-id format and the 400 replacement_unknown case. The description still adds workflow meaning beyond the schema: replace_with repoints every reference in every campaign sequence before the delete, in one transaction. It does not restate custom_variable_id, which is fine since the schema covers it.

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 ('Remove a custom variable from the workspace registry') and immediately scopes it against two siblings: rename_custom_variable for renames and delete-and-recreate as an anti-pattern. An agent can distinguish this from list/update/rename without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit prerequisites ('Call get_custom_variable_usage first'), explains the 409 refusal condition and why it exists, and names the intended path past it (replace_with) with a direct preference statement over hand-editing sequences. It also routes renames to rename_custom_variable. This is when/when-not/alternatives in full.

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