Getting started

How tools behave

These rules apply to every tool. The tool reference covers each tool's parameters and results.

Result format

A tools/call that reaches a tool always returns a JSON-RPC result, even when the tool refuses or fails. The result has one of two shapes:

  • Success with data: content holds one text block with the payload as pretty-printed JSON, structuredContent holds the same payload as an object, and isError is false.
  • Message: content holds one text block with a plain-language message, with no structuredContent. Every tool error uses this shape, with isError: true.
JSON
{"jsonrpc":"2.0","id":7,"result":{"content":[{"type":"text","text":"Order 48213 was not found in this account."}],"isError":true}}

Tool errors cover bad or missing arguments, records that aren't found, plan features you don't have, business refusals such as a price above your max_cost, and carrier messages, which are passed through word for word. Arguments are checked by each tool rather than against inputSchema, so a missing argument comes back as an isError message like "order_id is required." A value of the wrong type, such as the text order_number where order_id expects an integer, returns the general unexpected-error message instead. IDs are always the integer order_id, pickup_id, batch_id or job_id, never display numbers. The messages are written to be shown to the user or acted on by the assistant. A JSON-RPC error is reserved for protocol problems; see Errors.

Records outside your account are never visible. A not-found message reads the same whether the record doesn't exist or belongs to someone else.

Preview, then confirm

Tools that spend money, send email, cancel something or accept an agreement work in two steps, controlled by a boolean confirm argument:

  1. Preview. Call the tool without confirm (or with false). Nothing is bought, charged, voided, scheduled or sent. (One exception to "nothing changes": a trigger_batch_purchase preview rates each order and saves the weight and address it used, the same as get_rates.) The result includes "preview": true, what would happen (prices, balances, recipients, affected orders) and a note on how to proceed (buy_label calls it message).
  2. Confirm. Show the preview to the user. Once they agree, repeat the same call with "confirm": true.

Ship.com keeps nothing between the two calls. Most tools re-read everything on confirm, so the outcome reflects the moment you confirm. buy_label is the exception: it charges the price sealed in the rate_id you got from get_rates. That token is signed by Ship.com and can't be edited, so the price still never comes from the client. The server doesn't require a preview before a confirm, so previewing first is up to the client. Send confirm as a JSON boolean.

register_ups is stricter. Its preview returns the full UPS Technology Agreement and an agreement_token, and the confirm call must send that token back. The user must read and accept the agreement themselves; an assistant should never accept it on their behalf.

Each tool in tools/list carries annotations with a title and readOnlyHint. Write tools also carry destructiveHint. It is true for every write tool except create_order, bulk_create_orders and sync_platform_orders, which only add new records. mark_labels_printed counts as destructive because confirming it emails your customers. MCP clients use these hints to decide when to ask the user before running a tool. get_rates is marked read-only, but it can save the weight you pass and address-check results on the order.

Money safety

Only two tools spend money, buy_label and trigger_batch_purchase, and both are offered on access-token connections only. Here is where the money comes from:

  • Postage balance first. Labels are paid from your Ship.com postage balance. buy_label adds a $0.30 pay-as-you-go fee per label when your auto-recharge amount is $0.01 or less. Shipping insurance, when on, is charged on top of postage.
  • Auto-recharge. If your balance can't cover postage and insurance, what happens depends on your auto-recharge amount. Above $0.01, your payment method on file is charged the larger of that amount and the shortfall before the label is created. At $0.01 (pay as you go), it's charged the shortfall plus the $0.30 fee, at least $1. At $0, the purchase fails. Those funds stay on your balance even if the purchase then fails. A batch tops up once, before any label is bought.
  • Previews show the cost. The buy_label preview returns total_charge, current_balance, balance_after and auto_recharge_would_fire. The batch preview returns per-order prices and a postage total_cost.
  • Price ceilings. Pass max_cost to buy_label or max_total to trigger_batch_purchase. A price above the ceiling is refused and nothing is charged. Both ceilings cover postage only, not fees or insurance.
  • No double buys. If an order already has a label, buy_label returns that label and charges nothing. Its response still reads purchased: true, so check get_label first when you're not sure.
  • Batches run in the background. A confirmed batch is queued, and its labels are usually bought within about a minute. Follow it with get_batch_status. Only one batch can run at a time.
  • Refunds go to your postage balance. Voiding a label (cancel_shipping_label, or cancel_order on an unshipped order) credits your postage balance once the carrier accepts the void, typically within about 14 days, if the package was never scanned. Refunds are credited to your postage balance, not to a card.
  • Everything else is free. Pickups booked with schedule_pickup cost nothing, and redeem_referral_credit moves referral credit into postage without charging a card. To add funds or change auto-recharge, use the Ship.com web app.

Emails sent with send_customer_email and send_mass_marketing_email are real and can't be recalled, so treat them with the same care.

Plan features

Every tool is listed on every plan. Some check a plan feature when called and refuse with an isError message if your plan doesn't include it (the email tools still preview and report the result in limit_check):

FeatureToolsIncluded onMessage without it
Carrier pickupschedule_pickupCurrently Growth, Executive, Ultra"Your current Ship.com plan does not include carrier pickup scheduling. Upgrade the subscription to use this tool."
Batch shippingtrigger_batch_purchase, get_batch_statusCurrently Growth, Executive, Ultra"Your current Ship.com plan does not include batch label purchasing. Upgrade the subscription to use this tool."
Business reportingget_shipping_report, get_tax_report, get_shipping_analyticsCurrently Executive, Ultra"Your current Ship.com plan does not include business reporting. Upgrade the subscription to use this tool."
Marketing emailsend_customer_email, send_mass_marketing_emailCurrently Growth and Executive (monthly allowance), Ultra (unlimited); trials have a separate cap. See Marketing-email allowanceThe preview's limit_check shows allowed: false and reason: "no_entitlement"; confirming is refused with "Marketing email campaigns are not included with your current subscription."

Plan contents can change; get_subscription_info shows what your plan includes today.

Features follow the plan currently selected on your account. An account with no plan selected yet, or on an older plan that's no longer sold, is treated as not including them. Call get_subscription_info to check: tier.features shows carrier_pickup, batch and business_reporting. Pickup cancellation, pickup lookups and every other tool have no plan requirement. Email allowances are covered under Marketing-email allowance.

Label purchases also follow your plan's monthly shipment limit, if it has one. Past the limit, buy_label returns "Label purchase failed — Limit reached: " followed by the limit.

Errors

Errors come from three layers. Authentication, origin and rate-limit problems are plain HTTP responses with a JSON body {"error": "...", "message": "..."}, not JSON-RPC. Every 401 also carries the WWW-Authenticate challenge described under Authentication.

HTTPerrorMeaning
401missing_bearer_tokenNo Authorization: Bearer header, or an empty one.
401invalid_tokenThe token isn't recognized: it was replaced, or the app was disconnected. Also returned when the token's account no longer exists, and when the header value is malformed, for example Bearer Authorization: Bearer ....
401expired_tokenThe token has expired. Refresh an OAuth token, or get a new access token from Settings.
401invalid_informationThe request couldn't be authorized. Contact help@ship.com if you believe this is a mistake.
403forbidden_originThe request came from a browser page on a website Ship.com doesn't allow. Requests without an Origin header, such as server-side calls, aren't affected.
429rate_limitedMore than 60 requests in a minute for this token. See Rate limits.
405GET on /mcp (plain-text body). Only POST is supported, and there is no server-sent event stream.
202Not an error: a notification (a message with no id) was accepted. It is never answered.

Protocol problems return HTTP 200 with a JSON-RPC error object holding code and message:

CodeMeaning
-32700The body is empty or isn't valid JSON.
-32600Invalid request: the body isn't a single JSON object (batch arrays aren't supported), or method is missing.
-32601Unknown method. Supported methods are initialize, ping, tools/list and tools/call; names are case-sensitive.
-32602tools/call has no tool name, names a tool that doesn't exist (names are case-sensitive), or names a tool not offered on this connection.
-32603An unexpected error on Ship.com's side. Try again, and contact help@ship.com if it continues.

Everything that happens inside a tool, including plan refusals and failures, is a result with isError: true (see Result format). If a tool hits an unexpected error, its message says whether any work may have been saved. Re-read the current state, for example with get_order, get_label or get_balance, before retrying anything that spends money.

Rate limits

  • MCP endpoint: 60 requests per minute per token. The window resets at the start of each minute (UTC). Every authenticated request counts, including initialize and tools/list; notifications don't. Over the limit you get HTTP 429 with Retry-After: 60. Each token has its own allowance, so a refreshed OAuth token starts a fresh count.
  • OAuth token endpoint: 30 requests per minute per IP address, also with Retry-After: 60.
  • Business limits are separate: your plan's monthly shipment and email allowances, and one batch at a time.

Shared conventions

  • Examples: each tool's example below is the arguments object. Send it as {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_rates","arguments":{...}}}. See Ship an order end to end.
  • Names: arguments and result fields use snake_case.
  • Types: send real JSON types: integers for IDs, booleans for confirm, numbers for money and weights.
  • Money: US dollars as plain JSON numbers.
  • Weights: ounces (weight_oz).
  • Dates: YYYY-MM-DD. Timestamps in results are UTC. Most have no time zone suffix; a few, such as ship_date from get_rates, end in Z.
  • Paging: list tools take page (from 1) and page_size (up to 50), or limit; each tool lists its defaults. tools/list returns the whole catalog in one response.
  • Order statuses: status filters take names such as ChooseShipping (ready to ship) and LabelPrinted. Some results show the display label, such as "Ready to ship", instead. See Order statuses.