Skip to main content
Glama

Create an order (spends credits)

create_order
Idempotent

Spends 1 credit per complete UK record against a live machine quote from quote_order, and queues the order. It needs the quote_id and an idempotency_key to reuse on any retry, so a retry never charges twice; a flag set by a model is never consent. Where the host supports elicitation the user confirms the spend in a form or on mydatahub.emailmovers.com; otherwise an agent key must cover it within its per-order cap and monthly budget. If neither applies nothing is charged: the result is a confirmation-required error with an approval_url to give the user, so keep the quote_id; a short balance returns a top_up_url. Call get_order until the status is ready, then fetch_order_records. Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

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": {
      "quote_id": "<quote_id>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "create_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
deliveryNoapi (fetch records), csv (signed download) and google_sheets. Default api.
quote_idYesA live machine quote from quote_order. Without one nothing is charged.
idempotency_keyYesAny unique string, such as a V4 UUID. Reuse it when retrying the same order so it is never charged twice; a different order needs a new key.
confirmation_tokenNoThe token the approval page on mydatahub.emailmovers.com returns once the signed-in person approves. It is bound to that person (their sub), this spend (the machine quote_id, or the enrichment or push) and an expiry no later than the quote's, and it is redeemable once.

Output Schema

NameRequiredDescriptionDefault
idYesFormat: an order id: ord_ followed by a 26 character ULID in upper case Crockford base32, such as ord_01JB4N9S3W2X6Y7Z8A1B2C3D4E.
nameNo
testNoA test mode order (a test key, or anyone in a demo organisation): no credits were charged, the records are invented and no licence is granted. Absent on a live order.
statusYesqueued, building, verifying, ready; failed if processing failed; cancelled (only while queued).
failureNo
licenceYes
recordsYes
cost_gbpYesThe value of the credits charged, in GBP, plus VAT (VAT is not included in this figure; it is paid when credits are bought). Credits bought by card count at what their purchase cost, and card-bought credits are used oldest first; free trial credits count at 0; any other credits at your plan's rate (a new customer's rate on the free plan).
count_idYesThe count the machine quote was priced from.
deliveryNo
quote_idYesThe machine quote the order settled.
ready_atNo
buyer_kitNo
field_setNo
created_atNo
receipt_urlNoA path on https://mydatahub.emailmovers.com starting /v1/. Resolve it against the origin (RFC 3986), not by appending it to the server URL.
records_urlYesA path on https://mydatahub.emailmovers.com starting /v1/. Resolve it against the origin (RFC 3986), not by appending it to the server URL.
confirmed_byYes
download_urlNo302 to a single-use signed URL that lives 5 minutes.
verificationNoThe real-time check at delivery, such as 4,102 checked, 4,071 passed.
credits_chargedYesCredits, to one decimal place: whole at 1 credit a record, fractional only where a rule is (0.1 company-only, 1.8 outright, both proposed).
dataset_versionNoThe immutable weekly build a count is bound to, such as 2026-W39. The last 52 stay queryable.
credits_remainingYesThe balance right after this order was charged.
validation_reportNoPresent once the order is ready.
licence_expires_atYesWhen the licence ends; null for outright ownership.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / cost_gbp / description
      Previous value: -"The value of the credits charged, in GBP at your plan's rate, plus VAT (VAT is not included in this figure; it is paid when credits are bought)."New value: +"The value of the credits charged, in GBP, plus VAT (VAT is not included in this figure; it is paid when credits are bought). Credits bought by card count at what their purchase cost, and card-bought credits are used oldest first; free trial credits count at 0; any other credits at your plan's rate (a new customer's rate on the free plan)."
  2. Changed1 schema field changed
    • changedOutput schema / properties / cost_gbp / description
      Previous value: -"The charge in GBP excluding VAT at your plan's rate."New value: +"The value of the credits charged, in GBP at your plan's rate, plus VAT (VAT is not included in this figure; it is paid when credits are bought)."
  3. Changed1 schema field changed
    • addedOutput schema / properties / test
      Added value: +{
      +  "const": true,
      +  "description": "A test mode order (a test key, or anyone in a demo organisation): no credits were charged, the records are invented and no licence is granted. Absent on a live order.",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Well beyond the annotations, it discloses the spend mechanics, the double-charge guard, the two authorization paths (host elicitation vs. agent-key cap and monthly budget), and concrete error outcomes (confirmation-required with approval_url, short balance with top_up_url). The compliance note on UK GDPR 6(1)(f) and PECR default exclusion of sole traders is extra useful context, though it sits oddly alongside the spend-focused purpose.

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

Conciseness3/5

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

The cost rule is front-loaded correctly, but the body is a single run-on paragraph of semicolon-chained clauses covering spending, approvals, errors, polling, and privacy law, which makes scanning hard. Nearly every clause carries information, but the density and lack of structure cost it.

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 output schema exists, the description covers everything else an agent needs: prerequisites, retry safety, authorization fallbacks, error handling with recovery URLs, and the polling path to results. Nothing material for correct invocation is missing.

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?

With 80% schema coverage the baseline is 3, but the description earns more: it explains that quote_id must be a live quote from quote_order, that idempotency_key must be reused across retries but changed for a different order, and that quote_id must be retained when a confirmation-required error occurs. Only confirmation_token's binding is left entirely to the schema.

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 first clause names a specific verb, resource and cost model: 'Spends 1 credit per complete UK record against a live machine quote from quote_order, and queues the order.' It explicitly ties the tool to quote_order as the source of its input and to get_order/fetch_order_records as downstream steps, so an agent can position it precisely among siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the prerequisite (a live quote from quote_order), the retry protocol (reuse the same idempotency_key), and the follow-up sequence ('Call get_order until the status is ready, then fetch_order_records'). It also spells out the when-not path: if neither elicitation nor an agent-key budget applies, nothing is charged.

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