@tenkeybridge/mcp 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.js +83 -11
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +83 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +83 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -17,6 +17,7 @@ interface EntityAccessorLike {
|
|
|
17
17
|
}
|
|
18
18
|
type GatewayClient = Record<string, unknown> & {
|
|
19
19
|
query(entity: string, opts?: QueryOptions): Promise<unknown>;
|
|
20
|
+
report?(name: string, params?: Record<string, string>): Promise<unknown>;
|
|
20
21
|
};
|
|
21
22
|
declare function registerTools(server: McpServer, client: GatewayClient): void;
|
|
22
23
|
|
|
@@ -75,6 +76,6 @@ declare function resolveEntityName(name: string): EntityName | undefined;
|
|
|
75
76
|
type CatalogSummaryRow = Pick<CatalogEntry, "entity" | "verdict" | "group" | "read" | "write" | "headline" | "usage">;
|
|
76
77
|
declare function catalogSummary(): CatalogSummaryRow[];
|
|
77
78
|
|
|
78
|
-
declare const PKG_VERSION = "0.
|
|
79
|
+
declare const PKG_VERSION = "0.5.0";
|
|
79
80
|
|
|
80
81
|
export { CATALOG, type CatalogEntry, type CatalogField, type CatalogSummaryRow, type CatalogUnsupported, type EntityAccessorLike, type GatewayClient, type McpAuth, type McpConfig, PKG_VERSION, SERVER_NAME, buildServer, catalogSummary, defaultTokenFile, loadConfig, persistRefreshToken, readStoredRefreshToken, registerResources, registerTools, resolveCatalog, resolveEntityName };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface EntityAccessorLike {
|
|
|
17
17
|
}
|
|
18
18
|
type GatewayClient = Record<string, unknown> & {
|
|
19
19
|
query(entity: string, opts?: QueryOptions): Promise<unknown>;
|
|
20
|
+
report?(name: string, params?: Record<string, string>): Promise<unknown>;
|
|
20
21
|
};
|
|
21
22
|
declare function registerTools(server: McpServer, client: GatewayClient): void;
|
|
22
23
|
|
|
@@ -75,6 +76,6 @@ declare function resolveEntityName(name: string): EntityName | undefined;
|
|
|
75
76
|
type CatalogSummaryRow = Pick<CatalogEntry, "entity" | "verdict" | "group" | "read" | "write" | "headline" | "usage">;
|
|
76
77
|
declare function catalogSummary(): CatalogSummaryRow[];
|
|
77
78
|
|
|
78
|
-
declare const PKG_VERSION = "0.
|
|
79
|
+
declare const PKG_VERSION = "0.5.0";
|
|
79
80
|
|
|
80
81
|
export { CATALOG, type CatalogEntry, type CatalogField, type CatalogSummaryRow, type CatalogUnsupported, type EntityAccessorLike, type GatewayClient, type McpAuth, type McpConfig, PKG_VERSION, SERVER_NAME, buildServer, catalogSummary, defaultTokenFile, loadConfig, persistRefreshToken, readStoredRefreshToken, registerResources, registerTools, resolveCatalog, resolveEntityName };
|
package/dist/index.js
CHANGED
|
@@ -2439,7 +2439,7 @@ var CATALOG = {
|
|
|
2439
2439
|
"group": "platform",
|
|
2440
2440
|
"read": "partial",
|
|
2441
2441
|
"write": "none",
|
|
2442
|
-
"headline": "
|
|
2442
|
+
"headline": "Forty-eight QBO-compatible reports served from QuickBooks Desktop: 24 translated live from Desktop's report engine (summary, detail, aging, balance, sales and sales-tax reports), 22 Desktop extension reports with no QBO twin, and two composites, AccountList (built from Desktop's account list) and CashFlow (built from several queries). CashFlow is derived, not translated: Desktop's SDK has no cash-flow report, so it is computed from Profit and Loss and two Trial Balances and checked against Desktop before it is returned.",
|
|
2443
2443
|
"usage": "GET /v3/company/{companyId}/reports/ProfitAndLoss?start_date=2026-01-01&end_date=2026-12-31&summarize_column_by=Month",
|
|
2444
2444
|
"fields": [
|
|
2445
2445
|
{
|
|
@@ -2482,6 +2482,16 @@ var CATALOG = {
|
|
|
2482
2482
|
"support": "partial",
|
|
2483
2483
|
"note": "GeneralDetailReportQueryRq Journal / TxnListByDate. ColKeys best-effort. Journal's per-transaction unlabeled subtotals become header-less Sections; TransactionList is a flat Data list. Desktop refuses ReportBasis on both, so accounting_method faults."
|
|
2484
2484
|
},
|
|
2485
|
+
{
|
|
2486
|
+
"qbo": "InventoryValuationDetail / TransactionListByCustomer / TransactionListByVendor",
|
|
2487
|
+
"support": "partial",
|
|
2488
|
+
"note": "GeneralDetailReportQueryRq InventoryValuationDetail / TxnListByCustomer / TxnListByVendor. ColKeys best-effort. Desktop refuses ReportBasis on all three (3151), so accounting_method faults. InventoryValuationDetail takes the item filter only."
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
"qbo": "TaxSummary",
|
|
2492
|
+
"support": "partial",
|
|
2493
|
+
"note": "Desktop's Sales Tax Liability report (GeneralSummaryReportQueryRq SalesTaxLiability): taxable and non-taxable sales and tax collected. accounting_method is honored. Desktop refuses SummarizeColumnsBy here, so summarize_column_by takes Total only."
|
|
2494
|
+
},
|
|
2485
2495
|
{
|
|
2486
2496
|
"qbo": "CustomerBalanceDetail / VendorBalanceDetail",
|
|
2487
2497
|
"support": "partial",
|
|
@@ -2492,6 +2502,21 @@ var CATALOG = {
|
|
|
2492
2502
|
"support": "partial",
|
|
2493
2503
|
"note": "AgingReportQueryRq ARAgingDetail / APAgingDetail, as-of (report_date), with the receivable (customer) or payable (vendor) filter. ColKeys best-effort."
|
|
2494
2504
|
},
|
|
2505
|
+
{
|
|
2506
|
+
"qbo": "CashFlow",
|
|
2507
|
+
"support": "partial",
|
|
2508
|
+
"note": "Derived (TkbDerivedReport): Desktop's SDK has no cash-flow report, so TenkeyBridge builds the indirect-method statement from Desktop's Profit and Loss and two Trial Balances, classified by account type. Bank accounts plus Undeposited Funds count as cash, as in QBO. Fixed Asset accounts, including accumulated depreciation, are investing (Desktop's own default classification). Self-checking: if the derived net income differs from Desktop's by a cent, or a trial-balance row cannot be matched to an account, the call fails with REPORT_COMPOSE_FAILED (502) instead of answering. Five QuickBooks round trips. Sandbox realms serve it from captured sample inputs (SandboxStaticReport)."
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"qbo": "AccountList",
|
|
2512
|
+
"support": "partial",
|
|
2513
|
+
"note": "Built from Desktop's account list (AccountQueryRq). Desktop has no account detail type, so that column is absent."
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
"qbo": "Desktop extension reports",
|
|
2517
|
+
"support": "full",
|
|
2518
|
+
"note": "ProfitAndLossByClass, ProfitAndLossByJob, ProfitAndLossPrevYearComp, ProfitAndLossYTDComp, BalanceSheetPrevYearComp, BalanceSheetByClass, PurchaseByVendorSummary, PurchaseByItemSummary, SalesByRepSummary, InventoryStockStatusByItem, OpenInvoices, UnpaidBillsDetail, OpenPOs, SalesByCustomerDetail, SalesByItemDetail, IncomeByCustomerDetail, ExpenseByVendorDetail, PurchaseByVendorDetail, DepositDetail, CheckDetail, BalanceSheetDetail, CollectionsReport. Desktop reports with no QBO twin, served under their Desktop names in the same QBO report JSON."
|
|
2519
|
+
},
|
|
2495
2520
|
{
|
|
2496
2521
|
"qbo": "start_date / end_date / date_macro",
|
|
2497
2522
|
"support": "full",
|
|
@@ -2520,6 +2545,30 @@ var CATALOG = {
|
|
|
2520
2545
|
"note": "Comma-separated Ids \u2192 ReportEntityFilter (customer + vendor) / ReportItemFilter / ReportClassFilter. AR reports accept customer only, AP reports vendor only; InventoryValuationSummary accepts item only.",
|
|
2521
2546
|
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2522
2547
|
},
|
|
2548
|
+
{
|
|
2549
|
+
"qbo": "account / account_type",
|
|
2550
|
+
"support": "partial",
|
|
2551
|
+
"note": "account is comma-separated account Ids (ReportAccountFilter ListID); account_type is one QBO account type (Bank, AccountsReceivable, OtherCurrentAsset, FixedAsset, OtherAsset, AccountsPayable, CreditCard, OtherCurrentLiability, LongTermLiability, Equity, Income, CostOfGoodsSold, Expense, OtherIncome, OtherExpense) mapped to AccountTypeFilter. Sending both faults. Accepted on the summary reports (except InventoryValuationSummary) and on every detail report except AgedReceivableDetail / AgedPayableDetail. The aging reports refuse both: Desktop's aging account filter does not filter meaningfully.",
|
|
2552
|
+
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
"qbo": "transaction_type",
|
|
2556
|
+
"support": "partial",
|
|
2557
|
+
"note": "Comma-separated QBO transaction types (Invoice, CreditMemo, SalesReceipt, Payment, Deposit, Transfer, Estimate, Bill, VendorCredit, BillPayment, BillPaymentCheck, BillPaymentCreditCard, Check, CreditCardCharge, CreditCardCredit, PurchaseOrder, JournalEntry, InventoryQuantityAdjustment) mapped to ReportTxnTypeFilter. BillPayment fans out to both check and credit-card bill payments. Types with no single Desktop twin (Expense, CashPurchase, RefundReceipt) fault. Accepted on summary, detail and aging reports (not InventoryValuationSummary).",
|
|
2558
|
+
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
"qbo": "start_moddate / end_moddate",
|
|
2562
|
+
"support": "partial",
|
|
2563
|
+
"note": "ISO dates that filter on the transaction last-modified date (ReportModifiedDateRangeFilter). Both are required together, otherwise REPORT_INVALID_DATE. Detail reports only (not AgedReceivableDetail / AgedPayableDetail); summary and aging reports refuse them.",
|
|
2564
|
+
"error": "REPORT_INVALID_DATE"
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
"qbo": "columns",
|
|
2568
|
+
"support": "partial",
|
|
2569
|
+
"note": "Comma-separated QBO ColKeys (tx_date, txn_type, doc_num, txn_num, name, cust_name, vend_name, memo, account_name, split_acc, klass_name, is_cleared, debt_amt, credit_amt, subt_nat_amount, rbal_nat_amount, subt_open_bal, due_date, past_due, po_num, term_name) mapped to IncludeColumn; aliases dedupe and an unknown key faults listing the accepted ones. Detail reports and AgedReceivableDetail / AgedPayableDetail only. When columns is sent, data rows carry the QuickBooks transaction id as id on the txn_type cell (GeneralLedger cost-posting rows have none). If txn_type is not among the requested columns, the id is on the first cell.",
|
|
2570
|
+
"error": "REPORT_UNSUPPORTED_OPTION"
|
|
2571
|
+
},
|
|
2523
2572
|
{
|
|
2524
2573
|
"qbo": "Column titles",
|
|
2525
2574
|
"support": "partial",
|
|
@@ -2528,14 +2577,9 @@ var CATALOG = {
|
|
|
2528
2577
|
],
|
|
2529
2578
|
"unsupported": [
|
|
2530
2579
|
{
|
|
2531
|
-
"case": "
|
|
2532
|
-
"error": "REPORT_UNKNOWN",
|
|
2533
|
-
"note": "QuickBooks Desktop's SDK has no cash-flow report (StatementOfCashFlows is refused with 3110 on every qbXML version)."
|
|
2534
|
-
},
|
|
2535
|
-
{
|
|
2536
|
-
"case": "columns / department / qzurl / adjusted_gain_loss",
|
|
2580
|
+
"case": "department / qzurl / adjusted_gain_loss",
|
|
2537
2581
|
"error": "REPORT_UNSUPPORTED_OPTION",
|
|
2538
|
-
"note": "
|
|
2582
|
+
"note": "Desktop has no departments (use class); QuickZoom URLs and multicurrency gain/loss adjustment are QBO-only."
|
|
2539
2583
|
},
|
|
2540
2584
|
{
|
|
2541
2585
|
"case": "aging_period / num_periods / aging_method",
|
|
@@ -2548,7 +2592,17 @@ var CATALOG = {
|
|
|
2548
2592
|
"note": "qbXML's SummarizeColumnsBy has no per-item, per-employee or per-location split (ItemType splits by item type, not by item)."
|
|
2549
2593
|
},
|
|
2550
2594
|
{
|
|
2551
|
-
"case": "
|
|
2595
|
+
"case": "ClassSales / DepartmentSales",
|
|
2596
|
+
"error": "REPORT_UNKNOWN",
|
|
2597
|
+
"note": "No Desktop SDK report. Use ProfitAndLoss?summarize_column_by=Classes."
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"case": "TransactionListWithSplits",
|
|
2601
|
+
"error": "REPORT_UNKNOWN",
|
|
2602
|
+
"note": "No Desktop SDK report of that name. Use JournalReport."
|
|
2603
|
+
},
|
|
2604
|
+
{
|
|
2605
|
+
"case": "other QBO report names",
|
|
2552
2606
|
"error": "REPORT_UNKNOWN",
|
|
2553
2607
|
"note": "Not shipped. The fault lists the supported reports."
|
|
2554
2608
|
}
|
|
@@ -3468,7 +3522,7 @@ function unknownEntity(name) {
|
|
|
3468
3522
|
if (gap) {
|
|
3469
3523
|
if (gap.verdict === "live") {
|
|
3470
3524
|
return fail(
|
|
3471
|
-
`${gap.entity} is a platform endpoint, not reachable through this server's entity tools. Call the REST API directly: ${gap.usage}
|
|
3525
|
+
`${gap.entity} is a platform endpoint, not reachable through this server's entity tools. ${gap.entity === "Reports" ? "Use the run_report tool." : `Call the REST API directly: ${gap.usage}.`} Detail: compat://entity/${gap.entity.toLowerCase()}`
|
|
3472
3526
|
);
|
|
3473
3527
|
}
|
|
3474
3528
|
const cases = gap.unsupported.map((u) => `- ${u.case}: ${u.error}${u.workaround ? ` \u2014 workaround: ${u.workaround}` : ""}`).join("\n");
|
|
@@ -3516,6 +3570,24 @@ function registerTools(server, client) {
|
|
|
3516
3570
|
}
|
|
3517
3571
|
}
|
|
3518
3572
|
);
|
|
3573
|
+
server.registerTool(
|
|
3574
|
+
"run_report",
|
|
3575
|
+
{
|
|
3576
|
+
description: "Run a QuickBooks Desktop report and get QBO-style report JSON (Header, Columns, Rows). Report names are QBO names such as ProfitAndLoss, BalanceSheet or CashFlow, plus Desktop extension reports. Params use QBO names, e.g. start_date, end_date, date_macro, accounting_method, summarize_column_by, customer, vendor, item, class, account, account_type, transaction_type, columns. Read compat://entity/reports for the available reports and which params each takes.",
|
|
3577
|
+
inputSchema: {
|
|
3578
|
+
report: z.string().describe('Report name, e.g. "ProfitAndLoss" (case-insensitive).'),
|
|
3579
|
+
params: z.record(z.string()).optional().describe('Query params, e.g. { "date_macro": "Last Month" }.')
|
|
3580
|
+
}
|
|
3581
|
+
},
|
|
3582
|
+
async ({ report, params }) => {
|
|
3583
|
+
if (!client.report) return fail("This TenkeyBridge client has no report() method; upgrade @tenkeybridge/client to 0.5.0.");
|
|
3584
|
+
try {
|
|
3585
|
+
return ok(await client.report(report, params ?? {}));
|
|
3586
|
+
} catch (err) {
|
|
3587
|
+
return failure(err);
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
);
|
|
3519
3591
|
server.registerTool(
|
|
3520
3592
|
"get",
|
|
3521
3593
|
{
|
|
@@ -3630,7 +3702,7 @@ function registerTools(server, client) {
|
|
|
3630
3702
|
}
|
|
3631
3703
|
|
|
3632
3704
|
// src/version.ts
|
|
3633
|
-
var PKG_VERSION = "0.
|
|
3705
|
+
var PKG_VERSION = "0.5.0";
|
|
3634
3706
|
|
|
3635
3707
|
// src/server.ts
|
|
3636
3708
|
var SERVER_NAME = "tenkeybridge";
|