Skip to main content
Glama

generatePass

Generate a wallet pass

Generates a wallet pass from a published template. For Apple passes (default), returns a signed .pkpass binary file directly. For Google passes (wallet_type: "google"), returns a JSON object containing a save_url that the user can open to add the pass to Google Wallet.

When wallet_type: "both", generates both Apple and Google passes in a single call. The response is always JSON with apple and google keys. Partial success is allowed — if one wallet fails, the other is still returned with a warning. Returns 201 if at least one succeeds.

The pass ID is returned in the X-Pass-Id response header (for single-wallet).

If the app has a validation webhook configured, the webhook is called once before generation (not per wallet type). A webhook rejection returns 403; a webhook error returns 502 (fail-closed).

Scope: passes:create

Maps to OpenAPI operationId generatePass — POST /generate-pass.

Same PassFast HTTP API, billing, and rate limits. Do not invent other paths.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDynamic field values merged into the template structure.
x_app_idNoOverride X-App-Id for this call. Omit the connection header by default; set it only for multi-app orgs.
locationsNoGPS locations where the pass is relevant (shown on lock screen). Overrides template defaults if provided.
expires_atNoOptional expiration timestamp for the pass.
external_idNoOptional external identifier for cross-system lookups.
template_idYesID of the published template to use.
wallet_typeNoTarget wallet platform. Defaults to `apple`. When set to `google`, the response is a JSON object with a `save_url` instead of a binary .pkpass file. When set to `both`, generates both Apple and Google passes in one call and returns a JSON object with `apple`, `google`, and `warnings` keys. apple
max_distanceNoMaximum distance in meters from a location for lock screen relevance.
get_or_createNoWhen true, if a pass with the same serial_number already exists and is active, return the existing .pkpass (200) instead of a 409 error. The response includes an `X-Pass-Existed: true` header. If the existing pass is voided/expired, returns 409. When false (default), duplicate serials always return 409.
relevant_dateNoISO 8601 date when the pass is relevant (appears on lock screen).
serial_numberYesUnique serial number for this pass.
strip_image_idNoOverride the template's strip/hero image for this pass only. The referenced image must belong to the same app and have purpose `strip` (or a `strip_*` variant). Applied to Apple `strip.png` and Google `heroImage` atomically (same value for both wallets in `wallet_type: "both"`). Omit or send `null` to use the template's strip image.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / x_app_id / description
      Previous value: -"Override X-App-Id for this call. Defaults to the MCP connection header."New value: +"Override X-App-Id for this call. Omit the connection header by default; set it only for multi-app orgs."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description goes far beyond the annotations by explaining response formats for Apple, Google, and both; partial success behavior; X-Pass-Id and X-Pass-Existed headers; webhook invocation, rejection, and fail-closed error mapping; and the meaning of 201/200/403/502 statuses. This is rich behavioral disclosure for a mutating operation with external webhook side effects, consistent with openWorldHint and idempotentHint false.

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

Conciseness5/5

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

The description is dense but well organized, with the core generation behavior front-loaded and wallet-specific variants, headers, webhook behavior, and API mapping following in logical order. Each sentence adds distinct information, from response format to failure behavior to operational scope. The slight repetition of 'Generates a wallet pass' is minor and does not hurt usability.

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?

Given the high parameter count, nested objects, absence of an output schema, and complex wallet/webhook behaviors, the description is exceptionally complete. It specifies return values for all wallet_type modes, status codes, headers, error paths, and the required OAuth scope. An agent has enough context to invoke the tool correctly and interpret the response without additional documentation.

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 all parameters are documented in the schema, but the description adds meaningful behavioral context for wallet_type, get_or_create, strip_image_id, and response headers. It clarifies partial success semantics for 'both' and the X-Pass-Id header, which are not fully obvious from the schema alone. It does not exhaustively explain every parameter, but the schema already handles the details.

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?

The description states a specific verb and resource: 'Generate a wallet pass' from a published template. It distinguishes output formats by wallet type and clearly differentiates this creation operation from sibling read/update/download tools like getPass, downloadPass, and updatePass. The OpenAPI operationId and POST /generate-pass mapping further disambiguate it.

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?

The description gives clear context on when to use the tool: to generate a wallet pass from a published template, with explicit wallet-type behavior. It does not explicitly name alternatives or exclusions, but the scope and detailed response semantics make the intended usage unambiguous. The 'Same PassFast HTTP API, billing, and rate limits. Do not invent other paths.' note also provides practical guardrails.

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.