Skip to main content
Glama

Invite B2B Customer

invite_b2b_customer

Invite a customer contact to the B2B store, as the B2B Customers page does: records an invitation and, once committed, emails the contact a link to set a password and sign in. The contact buys for the customer named by customerId (a customer business partner id; find it with lookup_business_partners) and sees that customer's prices and orders. The store must be set up and open, and the email must not already have a store login. The preview names the customer and store and warns when earlier invitations to the email are still waiting. Requires an operator (unpinned) credential with Write + storefront.execute and the Admin role.

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": {
      "customerId": "<customerId>",
      "email": "<email>",
      "firstName": "<firstName>",
      "lastName": "<lastName>"
    },
    "name": "invite_b2b_customer"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailYesThe contact's email address; the invitation is sent here.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
lastNameYesThe contact's last name.
firstNameYesThe contact's first name.
customerIdYesThe customer (business partner) id (GUID) the contact buys for.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
previewNo
warningNo
emailSentNo
expiresAtNo
invitationNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that nothing is written until commit, that the preview names customer and store and warns about still-pending earlier invitations, that the previewReceipt is single-use and must be paired with a fresh idempotencyKey, and that calls without it are refused. It also states the exact credential/scope/role requirements (operator unpinned credential, Write + storefront.execute, Admin role), which is precisely the kind of context annotations never carry.

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?

A single front-loaded paragraph that first states the action and effect, then prerequisites, then credential requirements — a sensible ordering with little filler. It is dense and one clause ('as the B2B Customers page does') is decorative rather than functional, but nothing is redundant with the schema.

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?

An output schema exists, so return values need not be described; the description instead covers the things the schema can't — side effects, the mandatory two-step write, idempotency discipline, authorization scope, and failure preconditions. For a 7-parameter external-facing mutation, that is complete enough to call correctly on the first attempt.

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; the description adds meaning on top by explaining the two-step preview/commit protocol and by telling the agent where to source customerId (a business partner id found via lookup_business_partners). The remaining parameters (email, firstName, lastName) are already fully described in the schema and need no further elaboration.

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 ('Invite a customer contact to the B2B store') and immediately states the two effects: records an invitation, then emails a set-password link once committed. It also scopes the result ('buys for the customer named by customerId', 'sees that customer's prices and orders'), which separates it from unrelated write tools such as invite_vendor_user.

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?

Gives real preconditions — the store must be set up and open, and the email must not already have a store login — plus the routing hint to call lookup_business_partners to obtain customerId. It does not explicitly contrast with a sibling invitation tool, so it's clear context without full alternative routing.

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