Skip to main content
Glama

update_lead_variables

DestructiveIdempotent

Edit personalization values on the LEAD record, which every campaign that lead is in shares (and, by default, the prospects already running pick the change up). To change a value for ONE campaign only and leave the lead and every other campaign alone, use update_prospect_variables instead. Change values on existing leads without re-pushing them. Use when a value was wrong or has changed, e.g. a company raised a new round, or to fix a bad import (a column that landed with the wrong value for a batch). Pass lead_id for one lead or lead_ids (up to 1000) to apply the same values to many; give exactly one of them. Pass an empty string to clear a variable. By default the change also reaches prospects already running in campaigns, EXCEPT any prospect that has already been sent a message using that variable, so it can never rewrite what someone actually received. Set propagate=false to update ONLY the leads. One lead returns counts of what was updated plus withheldTokens naming variables that were kept back for that reason. Many leads: PARTIAL SUCCESS IS NORMAL. Each lead is updated atomically with its own prospects, but a lead that fails is counted in failed and named in failedIds while the rest of the batch continues, so retry just those ids rather than replaying the whole batch. If nothing at all was updated the call fails with bulk_all_failed (422) and the counts are still in the body. Either way the response carries truncatedTokens, naming any variable whose value ran past the 500 character cap and was therefore stored CUT (for many leads, on EVERY id in the batch, reported once for the request). The write still succeeds, so truncatedTokens is your only signal: if it names a variable you were using to carry a whole message, shorten the text and call again.

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": {
      "values": "<values>"
    },
    "name": "update_lead_variables"
  }
}

Input Schema

NameRequiredDescriptionDefault
valuesYesVariable token -> new value, e.g. { recent_funding: 'Series C' }. Empty string deletes the value. Keys colliding with built-in variables are ignored. A value is TRIMMED AND TRUNCATED AT 500 CHARACTERS. That is not silent: the response names every variable it cut in `truncatedTokens`, so if you are writing a whole message into one variable rather than a short phrase, check that field and shorten the text if it appears.
lead_idNoOne lead to update (id from get_lead_list with include_leads). Use this OR lead_ids.
lead_idsNoMany leads to give the same values (ids from get_lead_list with include_leads), up to 1000. Use this OR lead_id.
propagateNoDefault true. Set false to update ONLY the leads and leave every running campaign untouched.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / lead_id / description
      Previous value: -"Lead id, from list_leads_in_list."New value: +"One lead to update (id from get_lead_list with include_leads). Use this OR lead_ids."
    • addedInput schema / properties / lead_ids
      Added value: +{
      +  "description": "Many leads to give the same values (ids from get_lead_list with include_leads), up to 1000. Use this OR lead_id.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 1000,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / propagate / description
      Previous value: -"Default true. Set false to update ONLY the lead and leave every running campaign untouched."New value: +"Default true. Set false to update ONLY the leads and leave every running campaign untouched."
    • changedInput schema / properties / values / description
      Previous value: -"Variable token -> new value, e.g. { recent_funding: 'Series C' }. Empty string deletes the value. Keys colliding with built-in variables are ignored. A value is TRIMMED AND TRUNCATED AT 500 CHARACTERS. That is not silent any more: the response names every variable it cut in `truncatedTokens`, so if you are writing a whole message into one variable rather than a short phrase, check that field and shorten the text if it appears."New value: +"Variable token -> new value, e.g. { recent_funding: 'Series C' }. Empty string deletes the value. Keys colliding with built-in variables are ignored. A value is TRIMMED AND TRUNCATED AT 500 CHARACTERS. That is not silent: the response names every variable it cut in `truncatedTokens`, so if you are writing a whole message into one variable rather than a short phrase, check that field and shorten the text if it appears."
    • changedInput schema / required
      Previous value: -[
      -  "lead_id",
      -  "values"
      -]New value: +[
      +  "values"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description goes well past them: default propagation to running prospects, the carve-out for prospects already messaged with that variable, propagate=false, per-lead atomicity, partial batch success with failed/failedIds, bulk_all_failed 422, and the 500-character cut surfaced only via truncatedTokens. However, it softens the destructive framing ("can never rewrite what someone actually received") without stating that existing lead values are overwritten in place and are not recoverable, so it does not fully earn a top score on the mutation risk the annotations flag.

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?

Front-loaded with purpose and the sibling alternative, then usage, then parameters, then failure semantics – a sensible order. It is long and repeats material that also lives in the schema (the 500-character truncation is explained in full in both places, and "change values without re-pushing" restates the opening sentence), so a few sentences could be cut.

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?

No output schema exists, so the description carries the whole return contract and does: update counts, withheldTokens, failed/failedIds for bulk, bulk_all_failed 422 with counts in the body, and truncatedTokens as the sole signal of a cut value. For a destructive multi-param write with nested values, nothing an agent needs to call it correctly or recover from partial failure 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% and already documents values, lead_id, lead_ids, and propagate, so the bar is a baseline 3. The description still adds real meaning beyond the schema: the strict mutual exclusivity ("give exactly one of them"), the empty-string-clears convention restated in prose, and the interplay between propagate and the already-messaged carve-out.

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?

Names a specific verb and resource ("Edit personalization values on the LEAD record") and immediately scopes it against the sibling: lead-level values shared by every campaign, versus update_prospect_variables for a single campaign. An agent can pick between the two without opening either 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?

Explicitly names the alternative and the condition that selects it (one-campaign-only edits go to update_prospect_variables), then gives concrete when-to-use triggers: a value was wrong or changed (new funding round) or a bad import put a wrong column value across a batch. The "without re-pushing them" note covers the case where the agent might otherwise reach for a different tool.

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