Skip to main content
Glama

Create a print order

create_order

Create a print order for an uploaded PDF, at the size you choose (size, from formats[].sizes in get_catalog; without it, the size the pages match exactly, else size_required). The file is never refused for its content: it is checked against the order after payment by our print team, who fit it to the size ordered and contact the buyer if they cannot. A storybook needs a page count we price. Returns { order, order_token } — the order object has order_id, status, amount, and payment_url (the Razorpay link, present while awaiting_payment). Give payment_url to the human to pay by the method chosen in pay_with (UPI or netbanking by default, which adds the 2% Razorpay fee; card adds 3%). SAVE order_token — it is shown only once and is required for get_order and cancel_order. The order confirms automatically after payment; unpaid orders expire after 72 hours. An order may carry a coupon code, which gives it the enterprise price.

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": {
      "upload_id": "<upload_id>",
      "format": "<format>",
      "email": "<email>",
      "address": "<address>"
    },
    "name": "create_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoThe size to print, as an id from formats[].sizes in get_catalog, e.g. "a4" for a sticker, "8x8" for a storybook, "a5-folded" for a folded-card. Optional: without it the order takes the size the PDF pages match (within 2 mm), and fails with size_required when they match none. An id the format is not sold in fails with unknown_size. sticker-a3 and greeting-card-a5 come in one size and ignore it. We print the file at this size, scaling it when its pages are larger or smaller.
emailYesBuyer email, e.g. priya@example.com; receives the Razorpay payment notification.
paperNopaperback/hardcover: inside-page paper, 170gsm (standard, the default) or 300gsm (thick, costs more); every cover is 300gsm card; see price_table.paper_prices in get_catalog. flat-card/folded-card: standard (300 GSM coated card, the default) or laminated. Ignored for other formats.
copiesNoRequired for sticker (500 to 10,000 pieces, cheaper per piece from 1,000) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books and greeting-card-a5 take 1 to 20, sticker-a3 exactly 1, every copy the same price, and only they may leave it out for 1 copy.
couponNoA coupon code (optional), e.g. "FRIEND25", for any product. It takes its percentage (discount_pct) off the retail price of that product, never below making cost (the enterprise price), and the amount and payment link reflect it. A coupon is for one product or for every product. Codes are 4 to 24 letters and digits, case does not matter. Check one first with GET /v1/coupons/{code}. Enterprise (invoiced) accounts already pay the enterprise price and cannot use coupons. A code that does not apply fails with coupon_not_found, coupon_expired, coupon_used_up, coupon_wrong_product or coupon_not_for_enterprise.
finishNopaperback/hardcover: the lamination, gloss (the default) or matte. flat-card/folded-card: matte (the default) or gloss, the coating of standard card or the lamination of laminated card. Ignored for other formats.
formatYespaperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker: custom-cut stickers, a one-page PDF at A3, A4 or A5 (portrait or landscape) with the artwork on a white or transparent background; we cut around the artwork. flat-card: a flat greeting card at A4, A5, A6, 8×8 in, 7×5 in or 6×4 in; page 1 front, page 2 back (optional). folded-card: a greeting card folded once, A4, A5 or A6 folded; the PDF page is the open spread (A3, A4 or A5 landscape), page 1 outside (back left, front right), page 2 inside (optional). sticker-a3: an A3 wall chart, an A3 print mounted on foam board, for platforms (exactly 1 page and 1 copy, 842×1191 pt). greeting-card-a5: one personalised folded A5 card for platforms, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed).
addressYesIndia shipping address (V1 ships within India only).
pay_withNoHow the buyer will pay the Razorpay link (optional, default "bank"). "bank" is UPI or netbanking and adds Razorpay's 2% fee; "card" is cards, wallets, EMI or Pay Later and adds 3%. The payment link offers only those methods, and order.amount shows price_paise, payment_fee_paise and total_paise. get_catalog's online_payment lists the live fees. Invoiced (enterprise) orders ignore it.bank
upload_idYesupload_id of an uploaded PDF (any PDF the PUT accepted).
client_referenceNoYour own order id, e.g. "shop-order-48213" (optional). For callers sending an API key it makes create_order idempotent: replaying the same reference returns the original order instead of printing a second copy (order_token is then null, it was shown at the original creation). A canceled, refunded or expired order releases its reference. Stored but not enforced for keyless callers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / copies / description
      Previous value: -"Required for sticker (500 to 10,000 pieces, cheaper per piece from 1,000) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books, sticker-a3 and greeting-card-a5 take 1 to 20, every copy the same price, and only they may leave it out for 1 copy."New value: +"Required for sticker (500 to 10,000 pieces, cheaper per piece from 1,000) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books and greeting-card-a5 take 1 to 20, sticker-a3 exactly 1, every copy the same price, and only they may leave it out for 1 copy."
    • changedInput schema / properties / format / description
      Previous value: -"paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker: custom-cut stickers, a one-page PDF at A3, A4 or A5 (portrait or landscape) with the artwork on a white or transparent background; we cut around the artwork. flat-card: a flat greeting card at A4, A5, A6, 8×8 in, 7×5 in or 6×4 in; page 1 front, page 2 back (optional). folded-card: a greeting card folded once, A4, A5 or A6 folded; the PDF page is the open spread (A3, A4 or A5 landscape), page 1 outside (back left, front right), page 2 inside (optional). sticker-a3: one uncut A3 portrait sheet on sticker media, a platform wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: one personalised folded A5 card for platforms, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."New value: +"paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker: custom-cut stickers, a one-page PDF at A3, A4 or A5 (portrait or landscape) with the artwork on a white or transparent background; we cut around the artwork. flat-card: a flat greeting card at A4, A5, A6, 8×8 in, 7×5 in or 6×4 in; page 1 front, page 2 back (optional). folded-card: a greeting card folded once, A4, A5 or A6 folded; the PDF page is the open spread (A3, A4 or A5 landscape), page 1 outside (back left, front right), page 2 inside (optional). sticker-a3: an A3 wall chart, an A3 print mounted on foam board, for platforms (exactly 1 page and 1 copy, 842×1191 pt). greeting-card-a5: one personalised folded A5 card for platforms, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."
    • addedInput schema / properties / pay_with
      Added value: +{
      +  "default": "bank",
      +  "description": "How the buyer will pay the Razorpay link (optional, default \"bank\"). \"bank\" is UPI or netbanking and adds Razorpay's 2% fee; \"card\" is cards, wallets, EMI or Pay Later and adds 3%. The payment link offers only those methods, and order.amount shows price_paise, payment_fee_paise and total_paise. get_catalog's online_payment lists the live fees. Invoiced (enterprise) orders ignore it.",
      +  "enum": [
      +    "bank",
      +    "card"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / size
      Added value: +{
      +  "description": "The size to print, as an id from formats[].sizes in get_catalog, e.g. \"a4\" for a sticker, \"8x8\" for a storybook, \"a5-folded\" for a folded-card. Optional: without it the order takes the size the PDF pages match (within 2 mm), and fails with size_required when they match none. An id the format is not sold in fails with unknown_size. sticker-a3 and greeting-card-a5 come in one size and ignore it. We print the file at this size, scaling it when its pages are larger or smaller.",
      +  "type": "string"
      +}
    • changedInput schema / properties / upload_id / description
      Previous value: -"upload_id of a PDF that passed validation."New value: +"upload_id of an uploaded PDF (any PDF the PUT accepted)."
  2. Changed1 schema field changed
    • changedInput schema / properties / coupon / description
      Previous value: -"A coupon code for stickers (optional), e.g. \"FRIEND25\". It gives the order the enterprise sticker price, and the amount and payment link reflect it. Codes are 4 to 24 letters and digits, case does not matter. Check one first with GET /v1/coupons/{code}. Enterprise (invoiced) accounts already pay that price and cannot use coupons. A code that does not apply fails with coupon_not_found, coupon_expired, coupon_used_up, coupon_wrong_product or coupon_not_for_enterprise."New value: +"A coupon code (optional), e.g. \"FRIEND25\", for any product. It takes its percentage (discount_pct) off the retail price of that product, never below making cost (the enterprise price), and the amount and payment link reflect it. A coupon is for one product or for every product. Codes are 4 to 24 letters and digits, case does not matter. Check one first with GET /v1/coupons/{code}. Enterprise (invoiced) accounts already pay the enterprise price and cannot use coupons. A code that does not apply fails with coupon_not_found, coupon_expired, coupon_used_up, coupon_wrong_product or coupon_not_for_enterprise."
  3. Changed2 schema fields changed
    • changedInput schema / properties / copies / description
      Previous value: -"Required for sticker (1,000 to 10,000 pieces) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books, sticker-a3 and greeting-card-a5 take 1 to 20, every copy the same price, and only they may leave it out for 1 copy."New value: +"Required for sticker (500 to 10,000 pieces, cheaper per piece from 1,000) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books, sticker-a3 and greeting-card-a5 take 1 to 20, every copy the same price, and only they may leave it out for 1 copy."
    • addedInput schema / properties / coupon
      Added value: +{
      +  "description": "A coupon code for stickers (optional), e.g. \"FRIEND25\". It gives the order the enterprise sticker price, and the amount and payment link reflect it. Codes are 4 to 24 letters and digits, case does not matter. Check one first with GET /v1/coupons/{code}. Enterprise (invoiced) accounts already pay that price and cannot use coupons. A code that does not apply fails with coupon_not_found, coupon_expired, coupon_used_up, coupon_wrong_product or coupon_not_for_enterprise.",
      +  "type": "string"
      +}
  4. Changed8 schema fields changed
    • addedInput schema / properties / address / properties / city / description
      Added value: +"City or town, e.g. \"Bengaluru\"."
    • addedInput schema / properties / address / properties / line1 / description
      Added value: +"Street address: flat or house, building, street, e.g. \"12B, Lakeview Apartments, 4th Cross\"."
    • addedInput schema / properties / address / properties / line2 / description
      Added value: +"Area or landmark (optional), e.g. \"Indiranagar, near Metro station\"."
    • addedInput schema / properties / address / properties / name / description
      Added value: +"Recipient name as the courier should read it, e.g. \"Priya Raman\"."
    • addedInput schema / properties / address / properties / state / description
      Added value: +"Indian state or union territory, e.g. \"Karnataka\"."
    • addedInput schema / properties / client_reference
      Added value: +{
      +  "description": "Your own order id, e.g. \"shop-order-48213\" (optional). For callers sending an API key it makes create_order idempotent: replaying the same reference returns the original order instead of printing a second copy (order_token is then null, it was shown at the original creation). A canceled, refunded or expired order releases its reference. Stored but not enforced for keyless callers.",
      +  "maxLength": 120,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / email / description
      Previous value: -"Buyer email; receives the Razorpay payment notification."New value: +"Buyer email, e.g. priya@example.com; receives the Razorpay payment notification."
    • addedInput schema / properties / email / format
      Added value: +"email"
  5. Changed7 schema fields changed
    • addedInput schema / properties / copies / description
      Added value: +"Required for sticker (1,000 to 10,000 pieces) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books, sticker-a3 and greeting-card-a5 take 1 to 20, every copy the same price, and only they may leave it out for 1 copy."
    • changedInput schema / properties / copies / maximum
      Previous value: -20New value: +10000
    • changedInput schema / properties / finish / description
      Previous value: -"Lamination for paperback/hardcover. Defaults to gloss. Ignored for other formats."New value: +"paperback/hardcover: the lamination, gloss (the default) or matte. flat-card/folded-card: matte (the default) or gloss, the coating of standard card or the lamination of laminated card. Ignored for other formats."
    • changedInput schema / properties / format / description
      Previous value: -"paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: folded A5 greeting card, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."New value: +"paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker: custom-cut stickers, a one-page PDF at A3, A4 or A5 (portrait or landscape) with the artwork on a white or transparent background; we cut around the artwork. flat-card: a flat greeting card at A4, A5, A6, 8×8 in, 7×5 in or 6×4 in; page 1 front, page 2 back (optional). folded-card: a greeting card folded once, A4, A5 or A6 folded; the PDF page is the open spread (A3, A4 or A5 landscape), page 1 outside (back left, front right), page 2 inside (optional). sticker-a3: one uncut A3 portrait sheet on sticker media, a platform wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: one personalised folded A5 card for platforms, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "paperback",
      -  "hardcover",
      -  "sticker-a3",
      -  "greeting-card-a5"
      -]New value: +[
      +  "paperback",
      +  "hardcover",
      +  "sticker",
      +  "flat-card",
      +  "folded-card",
      +  "sticker-a3",
      +  "greeting-card-a5"
      +]
    • changedInput schema / properties / paper / description
      Previous value: -"Inside-page paper for paperback/hardcover: 170gsm (standard, the default) or 300gsm (thick, costs more). Every cover is 300gsm card. See price_table.paper_prices in get_catalog. Ignored for other formats."New value: +"paperback/hardcover: inside-page paper, 170gsm (standard, the default) or 300gsm (thick, costs more); every cover is 300gsm card; see price_table.paper_prices in get_catalog. flat-card/folded-card: standard (300 GSM coated card, the default) or laminated. Ignored for other formats."
    • changedInput schema / properties / paper / enum
      Previous value: -[
      -  "170gsm",
      -  "300gsm"
      -]New value: +[
      +  "170gsm",
      +  "300gsm",
      +  "standard",
      +  "laminated"
      +]
  6. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"paperback/hardcover: bound storybook (20-44 page PDF). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: folded A5 greeting card, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."New value: +"paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: folded A5 greeting card, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."
    • addedInput schema / properties / paper
      Added value: +{
      +  "description": "Inside-page paper for paperback/hardcover: 170gsm (standard, the default) or 300gsm (thick, costs more). Every cover is 300gsm card. See price_table.paper_prices in get_catalog. Ignored for other formats.",
      +  "enum": [
      +    "170gsm",
      +    "300gsm"
      +  ],
      +  "type": "string"
      +}
  7. Changed2 schema fields changed
    • addedInput schema / properties / finish
      Added value: +{
      +  "description": "Lamination for paperback/hardcover. Defaults to gloss. Ignored for other formats.",
      +  "enum": [
      +    "gloss",
      +    "matte"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / format / description
      Previous value: -"paperback/hardcover: bound storybook (20-60 page PDF). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: folded A5 greeting card, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."New value: +"paperback/hardcover: bound storybook (20-44 page PDF). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: folded A5 greeting card, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."
  8. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"paperback/hardcover: bound storybook (20-60 page PDF). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt)."New value: +"paperback/hardcover: bound storybook (20-60 page PDF). sticker-a3: single-sheet A3 portrait sticker / wall chart (exactly 1 page, 842×1191 pt). greeting-card-a5: folded A5 greeting card, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed)."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "paperback",
      -  "hardcover",
      -  "sticker-a3"
      -]New value: +[
      +  "paperback",
      +  "hardcover",
      +  "sticker-a3",
      +  "greeting-card-a5"
      +]
  9. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the file is never rejected on content but reviewed post-payment, unpaid orders expire in 72 hours, the order auto-confirms after payment, order_token is shown once and is required for get_order/cancel_order, and payment fees differ by pay_with. The idempotency nuance via client_reference is qualified as API-key-only, which refines rather than contradicts 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.

Conciseness4/5

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

Front-loaded with purpose and size behavior, then return shape, payment, token, expiry and coupons in a logical order. It is long but each clause carries non-obvious operational content; the only cost is a dense single block with no visual separation, making the critical 'SAVE order_token' instruction easy to skim past.

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?

With no output schema, the description still names the return shape ({ order, order_token }) and the key order fields (order_id, status, amount, payment_url) plus when payment_url is present. For an 11-parameter creation tool with payment, coupon and expiry flows, an agent has everything needed to call it and handle the result.

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

Parameters3/5

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

Schema description coverage is 100%, so size, coupon, pay_with and client_reference semantics are already fully documented in the schema. The description largely restates those rules (size fallback, coupon/enterprise exclusion, fee percentages) plus one genuinely useful operational note: SAVE order_token. Baseline 3 is appropriate since the schema carries the load.

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?

States a specific verb and resource ('Create a print order for an uploaded PDF') plus the scoping variable (size chosen, defaulted from page match). An agent can immediately distinguish this from create_upload (which supplies the PDF) and get_order (which retrieves 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?

It gives concrete routing: size ids come from get_catalog's formats[].sizes, coupon codes should be pre-checked with GET /v1/coupons/{code}, and the uploaded PDF comes from a prior PUT/upload. What's missing is any explicit statement of when NOT to call this (e.g. wait for upload validation via validate_pdf, or use apply_enterprise for invoiced accounts).

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