Skip to main content
Glama
trhonpavel
by trhonpavel

Create fulfillment

create_fulfillment

Fulfill a Medusa order by specifying line items and stock location, or default to all remaining unfulfilled quantities and the only available location.

Instructions

Creates a fulfillment for an order. Without 'items' it fulfills all remaining unfulfilled quantities. Without 'location_id' it uses the only stock location, if there is exactly one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoSpecific line items; defaults to everything remaining
orderYesOrder ID or order number
location_idNoStock location to ship from
notify_customerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this is a non-idempotent write (readOnlyHint=false, idempotentHint=false, non-destructive). The description adds genuinely useful behavioral context beyond them: the implicit bulk action of fulfilling all remaining quantities when items is omitted, and the single-location fallback. It does not disclose the customer-visible effect of notify_customer, which is the one notable gap.

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 short sentences, each earning its place, with the core action front-loaded and the two conditional defaults following immediately.

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 non-idempotent mutation with no output schema, the description covers the essential default behaviors an agent must know before calling. Missing only the notify_customer side effect and the failure mode when no location_id is given and multiple locations exist.

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 75% and the description adds cross-parameter semantics the schema cannot express: the default expansion of items to 'everything remaining' and the conditional resolution of location_id. Only notify_customer's customer-facing effect remains unexplained.

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 a fulfillment for an order.' An agent can distinguish it from order-mutating siblings like complete_order and cancel_order, though it doesn't explicitly separate itself from the closest sibling create_shipment.

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 gives conditional default behavior ('Without items...', 'Without location_id...') which implies when the optional parameters can be omitted, but it never states when to prefer this tool over create_shipment or gives any prerequisites/exclusions.

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