Skip to main content
Glama
thenavidm
by thenavidm

Track a lead

track_lead
Destructive

Record a lead conversion for a short link, attributed to a click ID and customer, to support later sale attribution in Dub.

Instructions

Track a lead for a short link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoThe mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub; `deferred` will defer the lead event creation to a subsequent request.async
accountNoExact configured private workspace profile label; not a tenant or provider account ID.
clickIdNoThe unique ID of the click that the lead conversion event is attributed to. You can read this value from `dub_id` cookie. [For deferred lead tracking]: If an empty string is provided, Dub will try to find an existing customer with the provided `customerExternalId` and use the `clickId` from the customer if found.
confirmNoMust be true for the requested mutation or exclusive private output file.
payloadNoComplete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
metadataNoAdditional metadata to be stored with the lead event. Max 10,000 characters.
eventNameNoThe name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`).
customerNameNoThe name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).
payload_fileNoAbsolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags.
customerEmailNoThe email address of the customer.
eventQuantityNoThe numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times.
customerAvatarNoThe avatar URL of the customer.
customerExternalIdNoThe unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

D1.9/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and openWorldHint=true, so the safety profile is partly covered. The description adds nothing beyond them: it does not mention that this creates a persistent conversion event, that repeated calls are not idempotent, or any auth/rate-limit context. It does not contradict the annotations, but it contributes no behavioral context of its own.

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

Conciseness2/5

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

One short sentence is certainly terse, but the problem is under-specification rather than conciseness. A single sentence that merely echoes the title leaves the definition effectively empty for a 13-parameter, nested-payload mutation tool.

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

Completeness1/5

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

For a tool that writes conversion events with a nested payload requiring clickId, eventName, and customerExternalId, and that supports async/wait/deferred modes and deferred lead tracking semantics, the description omits every operational detail. No output schema exists to compensate, and the agent is left to reverse-engineer intent from the schema alone.

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

Parameters3/5

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

Schema description coverage is 100% and each field (mode, clickId, eventName, customerExternalId, payload, etc.) is well documented in the schema itself. Per the baseline rule for high coverage, 3 is appropriate; the description adds no parameter meaning beyond what the schema already states.

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

Purpose2/5

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

The description is essentially a restatement of the tool name and title ('Track a lead for a short link'), adding only a thin scope hint about short links. It does not distinguish this from siblings like track_sale or track_open, which are equally about conversion event tracking, so an agent cannot tell them apart from the text alone.

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

Usage Guidelines1/5

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

There is no when-to-use guidance, no when-not-to-use guidance, and no named alternative. Nothing tells the agent why it would pick track_lead over track_sale, track_open, or list_events, nor what preconditions (e.g. a valid clickId attribution) must hold.

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