Skip to main content
Glama

Import QuickBooks Master Data

import_qbo_master_data
DestructiveIdempotent

Bring the connected QuickBooks Online company's products, vendors (as suppliers) and customers into Spark as records, and optionally QuickBooks' on-hand quantities as opening stock. Requires the governed two-step protocol. Call it with preview=true first (the default): it reads QuickBooks and reports what would be matched, created or skipped, writing nothing, and returns a single-use previewReceipt. Show the person those counts and ask; once they agree, repeat the identical call with that previewReceipt and a fresh idempotencyKey to import. The receipt covers the QuickBooks records the preview read: if QuickBooks changes before the import, the import is refused with PREVIEW_RECEIPT_REJECTED and nothing is written; preview again and show the new counts. preview=false without a receipt is refused with PREVIEW_RECEIPT_REQUIRED. Products match Spark items by Spark's link, then SKU, then name; matched records keep their values and only blanks are filled. With createUnmatchedItems=false nothing new is created (use it when a store such as Shopify is the catalog). openingStock sets Spark's quantity to QuickBooks' (zero included) at the Internal warehouse, or warehouseId when there are several; it replaces the current on-hand. Safe to run again: it matches what it brought in before. Run it before the QuickBooks sales and purchase backfills so history lands on these items. Refused on a 3PL account and without a working QuickBooks connection. Requires an operator (unpinned) write credential with imports.execute, and an admin.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "import_qbo_master_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNoQuickBooks products (inventory and non-inventory items).
previewNoTrue (default) reports what would happen, writes nothing and returns a previewReceipt. The import itself needs previewReceipt and idempotencyKey.
vendorsNoQuickBooks vendors, as Spark suppliers with email, phone and payment terms.
customersNoQuickBooks customers. Store pseudo-customers and sub-customers are skipped.
warehouseIdNoWith openingStock: the Internal warehouse to set stock at (from list_warehouses). Needed only when the account has several.
openingStockNoSet Spark's on-hand to QuickBooks' quantity for the products QuickBooks tracks.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to import. A retry with the same key returns the first import's result without importing again.
previewReceiptNoStep 2 of the required two-step write: the receipt the preview returned. Supply it with a fresh idempotencyKey and the same arguments to import.
createUnmatchedItemsNoWith items: also create a Spark item for each QuickBooks product that matches none. False only links products to existing Spark items.

Output Schema

NameRequiredDescriptionDefault
previewNo
wouldDoNo
importedNo
nextStepNo
expiresAtNo
errorCountNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo
sourceFingerprintNo
ambiguousItemCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • addedInput schema / properties / idempotencyKey
      Added value: +{
      +  "default": null,
      +  "description": "Caller-generated idempotency key; required with previewReceipt to import. A retry with the same key returns the first import's result without importing again.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / preview / description
      Previous value: -"True (default) reports what would happen and writes nothing; false imports."New value: +"True (default) reports what would happen, writes nothing and returns a previewReceipt. The import itself needs previewReceipt and idempotencyKey."
    • addedInput schema / properties / previewReceipt
      Added value: +{
      +  "default": null,
      +  "description": "Step 2 of the required two-step write: the receipt the preview returned. Supply it with a fresh idempotencyKey and the same arguments to import.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / actionItemId
      Added value: +{
      +  "format": "uuid",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / approvalResult
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / confirmation
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / correlationId
      Added value: +{
      +  "format": "uuid",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / expiresAt
      Added value: +{
      +  "format": "date-time",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / idempotencyKey
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / idempotentReplay
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / previewReceipt
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sourceFingerprint
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description earns credit beyond them by spelling out what is destroyed (openingStock replaces current on-hand, zero included), why it is safe to repeat (matches what it brought in before), and the exact refusal codes PREVIEW_RECEIPT_REJECTED and PREVIEW_RECEIPT_REQUIRED with their remediation. It also discloses the permission requirements (imports.execute write credential plus admin).

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 then the protocol, and nearly every sentence carries operational weight. The single dense paragraph makes the critical two-step sequence harder to scan than a short bulleted ladder would, which keeps it from a 5.

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?

For a destructive, multi-mode import with an output schema already documenting return values, the description covers everything an agent needs: the mandatory preview step, receipt lifetime, idempotency, matching rules, failure modes, and prerequisites. Nothing essential is left to inference.

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 100%, so the baseline is 3, but the description adds real semantics: the preview/previewReceipt/idempotencyKey relationship (same identical arguments, fresh key), the match precedence of Spark link then SKU then name with blanks-only fill, and the warehouseId dependency on openingStock. It stops short of detailing every flag, but the interactions that matter are explained.

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?

Opens with a specific verb and resource set: bring QuickBooks products, vendors (as suppliers) and customers into Spark as records, plus optional on-hand quantities as opening stock. This is clearly distinct from siblings like trigger_qbo_sales_backfill or create_import_session.

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?

Gives explicit sequencing rules — run before the QuickBooks sales and purchase backfills — and names the precise condition for createUnmatchedItems=false (when a store such as Shopify is the catalog). It also states the two preconditions that make the call fail (3PL account, no working QuickBooks connection), so an agent knows when not to call.

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