Skip to main content
Glama

create_fulfillment

Mark items as shipped by creating a fulfillment record. Supports partial fulfillment, tracking info, and customer notification.

Instructions

Mark items as shipped — creates a fulfillment record covering one or more fulfillment orders. For each fulfillment order in the request, you can either fulfill everything still remaining (omit fulfillmentOrderLineItems) or specify per-line {id, quantity} pairs for partial shipments. Optionally attach tracking info (carrier + number; URL is auto-derived for major carriers like USPS/UPS/FedEx/DHL) and set notifyCustomer=true to send the shipment-confirmation email. The fulfillmentOrderLineItem IDs come from list_fulfillment_orders. Side effects: customer-facing email if notifyCustomer is true; webhook fires; remaining quantities decrement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineItemsByFulfillmentOrderYesOne entry per fulfillment order being fulfilled in this shipment.
trackingInfoNoTracking info. Company+number is enough; Shopify auto-derives URL for known carriers.
notifyCustomerNoSend the customer a shipment notification email.

Implementation Reference

  • throwIfUserErrors helper used by the handler to check and throw on Shopify API user errors.
    export function throwIfUserErrors(
      errors: ShopifyUserError[] | undefined,
      operation: string,
    ): void {
      if (!errors || errors.length === 0) return;
      const messages = errors
        .map((e) => (e.field ? `${e.field.join(".")}: ${e.message}` : e.message))
        .join("; ");
      throw new Error(`Shopify ${operation} userErrors: ${messages}`);
    }
Behavior5/5

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

With no annotations provided, the description fully discloses side effects: 'customer-facing email if notifyCustomer is true; webhook fires; remaining quantities decrement.' This goes beyond basic behavior.

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?

Three sentences, front-loaded with the core action, each sentence adding value. No unnecessary words. Structure supports quick comprehension.

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?

Given the complexity (nested objects, side effects), the description covers main points well. However, no output schema exists, and the description does not explain the return value (likely the fulfillment record). Minor gap.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds critical context: omitting fulfillmentOrderLineItems fulfills everything, tracking URL auto-derives for major carriers, and line item IDs come from list_fulfillment_orders.

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?

Description explicitly states 'Mark items as shipped — creates a fulfillment record', clearly identifying the verb (create) and resource (fulfillment record). It distinguishes from siblings like cancel_fulfillment and update_fulfillment_tracking.

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?

Description explains when to use (marking items as shipped) and mentions optional tracking and notification. It also references list_fulfillment_orders for IDs. However, it does not explicitly state when not to use this tool or provide alternatives like cancel_fulfillment.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/miller-joe/shopify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server