Skip to main content
Glama
thenavidm
by thenavidm

Create or update a partner

create_partner
Destructive

Creates or updates a partner by email: existing partners get program enrollment updated; new partners are registered with contact and link details.

Instructions

Creates or updates a partner record (upsert behavior). If a partner with the same email already exists, their program enrollment will be updated with the provided tenantId. If no existing partner is found, a new partner will be created using the supplied information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoThe partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)
emailNoThe partner's email address. Partners will be able to claim their profile by signing up at `partners.dub.co` with this email.
imageNoThe partner's avatar image. If not provided, a default avatar will be used.
accountNoExact configured private workspace profile label; not a tenant or provider account ID.
confirmNoMust be true for the requested mutation or exclusive private output file.
countryNoThe partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.
groupIdNoThe group ID to add the partner to. If not provided, the partner will be added to the default group.
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.
tenantIdNoThe partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.
usernameNoThe partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email.
linkPropsNoAdditional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
descriptionNoA brief description of the partner and their background. Max 5,000 characters.
payload_fileNoAbsolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=true, idempotentHint=false, openWorldHint=true), so the bar is lower. The description adds genuine behavioral context the annotations cannot convey: the email-keyed deduplication and that an existing partner's program enrollment is updated rather than a duplicate being created. It omits auth/permission needs and the role of the confirm 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?

Three tight sentences, front-loaded with the upsert nature, with zero filler. Minor redundancy in restating the create-vs-update outcome after the opening sentence, but every sentence contributes concrete detail.

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

Completeness4/5

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

For a 13-parameter tool with nested objects and no output schema, the description covers the core conceptual model (email-keyed upsert) that an agent most needs. It leaves the flat-params-versus-payload duality and the confirm requirement to the schema, which documents them, so the gap is acceptable.

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 the baseline is 3, but the description adds meaning the schema does not: email is the identity key driving the upsert, and tenantId is what gets written to an existing enrollment. Other params (linkProps, payload, account) rely entirely on schema text.

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

Purpose4/5

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

States a specific verb and resource ('Creates or updates a partner record') and immediately characterizes the operation as upsert, which is more precise than the title alone. It does not explicitly distinguish itself from siblings like list_partners or ban_partner, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

The description explains the branch condition (same email exists → update enrollment; otherwise → create), which implies when each behavior fires. However, it gives no guidance on when an agent should call this versus other partner tools, nor any preconditions or exclusions.

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