@tenkeybridge/mcp 0.8.0 → 0.10.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/dist/cli.js +166 -31
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +168 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +166 -31
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1460,6 +1460,11 @@ var CATALOG = {
|
|
|
1460
1460
|
"support": "full",
|
|
1461
1461
|
"note": "Desktop TargetBonus, a money amount. Accepted on create and update without a payroll subscription (verified live on QuickBooks Enterprise 24, 2026-10-15); Desktop's create response omits it but reads return it."
|
|
1462
1462
|
},
|
|
1463
|
+
{
|
|
1464
|
+
"qbo": "PayrollInfo",
|
|
1465
|
+
"support": "partial",
|
|
1466
|
+
"note": "TenkeyBridge extension, read-only: Desktop's EmployeePayrollInfo as { PayPeriod, ClassRef, Earnings: [{ PayrollItemRef, Rate | RatePercent }], UseTimeDataToCreatePaychecks, SickHours, VacationHours } with hours as decimal numbers (PT40H30M0S reads 40.5). Present only when the file has a payroll subscription and the integrated app may access personal data (Edit, Preferences, Integrated Applications); otherwise absent. A create carrying PayrollInfo, or an update that changes it, answers 422 UNSUPPORTED_BY_DESKTOP; an unchanged echo on update is ignored. Not filterable."
|
|
1467
|
+
},
|
|
1463
1468
|
{
|
|
1464
1469
|
"qbo": "AdditionalContactRef",
|
|
1465
1470
|
"support": "none",
|
|
@@ -1474,9 +1479,9 @@ var CATALOG = {
|
|
|
1474
1479
|
"note": "QBO employees are deactivated, not deleted. Desktop can delete an employee with no transactions, but TenkeyBridge keeps deactivate-only to match QBO (sparse update with Active:false)."
|
|
1475
1480
|
},
|
|
1476
1481
|
{
|
|
1477
|
-
"case": "
|
|
1482
|
+
"case": "Writing payroll fields",
|
|
1478
1483
|
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
1479
|
-
"note": "Pay
|
|
1484
|
+
"note": "Pay periods, earnings rates and sick or vacation hours are read-only (see PayrollInfo). Set them in QuickBooks Desktop."
|
|
1480
1485
|
}
|
|
1481
1486
|
]
|
|
1482
1487
|
},
|
|
@@ -2293,6 +2298,64 @@ var CATALOG = {
|
|
|
2293
2298
|
}
|
|
2294
2299
|
]
|
|
2295
2300
|
},
|
|
2301
|
+
"Paycheck": {
|
|
2302
|
+
"entity": "Paycheck",
|
|
2303
|
+
"verdict": "live",
|
|
2304
|
+
"group": "transactions",
|
|
2305
|
+
"read": "partial",
|
|
2306
|
+
"write": "none",
|
|
2307
|
+
"headline": "TenkeyBridge extension: read-only list of QuickBooks Desktop payroll paychecks (header rows: employee, bank account, date, check number, net pay). QuickBooks Online has no Paycheck entity. Needs a payroll subscription and the personal-data permission",
|
|
2308
|
+
"fields": [
|
|
2309
|
+
{
|
|
2310
|
+
"qbo": "MetaData",
|
|
2311
|
+
"support": "full",
|
|
2312
|
+
"note": "Id is Desktop's TxnID. CreateTime and LastUpdatedTime come from Desktop's TimeCreated / TimeModified. There is no SyncToken: Desktop's paycheck rows carry no EditSequence."
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
"qbo": "TxnDate",
|
|
2316
|
+
"support": "full",
|
|
2317
|
+
"note": "The check date. Pushed to Desktop as a TransactionDateRangeFilter."
|
|
2318
|
+
},
|
|
2319
|
+
{
|
|
2320
|
+
"qbo": "DocNumber",
|
|
2321
|
+
"support": "full",
|
|
2322
|
+
"note": "Desktop RefNumber. Filters on it are applied by the gateway after the read."
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
"qbo": "EmployeeRef",
|
|
2326
|
+
"support": "full",
|
|
2327
|
+
"note": "Desktop EntityRef, the employee. An equality filter is pushed to Desktop as a TransactionEntityFilter."
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
"qbo": "BankAccountRef",
|
|
2331
|
+
"support": "full",
|
|
2332
|
+
"note": "Desktop AccountRef, the bank account the check is drawn on."
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
"qbo": "NetPay",
|
|
2336
|
+
"support": "full",
|
|
2337
|
+
"note": "Desktop Amount with the sign flipped: Desktop reports money out as negative, NetPay is the positive take-home amount. Filterable, applied by the gateway."
|
|
2338
|
+
}
|
|
2339
|
+
],
|
|
2340
|
+
"unsupported": [
|
|
2341
|
+
{
|
|
2342
|
+
"case": "Earnings, taxes and deductions",
|
|
2343
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2344
|
+
"note": "qbXML has no paycheck detail query: the paycheck list answers header rows only. Pay stub lines (earnings, taxes, deductions, hours) come from the payroll reports."
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
"case": "create, update, delete or void",
|
|
2348
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2349
|
+
"note": "Paycheck is read-only through TenkeyBridge. Paychecks are created in QuickBooks Desktop payroll.",
|
|
2350
|
+
"workaround": "Create or void the paycheck in QuickBooks Desktop (Employees, Pay Employees); it shows up on the next read."
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
"case": "File without payroll",
|
|
2354
|
+
"error": "PAYROLL_SUBSCRIPTION_REQUIRED",
|
|
2355
|
+
"note": "Desktop answers status 3262 when the company file has no payroll subscription (422 PAYROLL_SUBSCRIPTION_REQUIRED), and 3261 when the integrated app lacks the personal-data permission (403 QB_PERSONAL_DATA_DENIED)."
|
|
2356
|
+
}
|
|
2357
|
+
]
|
|
2358
|
+
},
|
|
2296
2359
|
"Payment": {
|
|
2297
2360
|
"entity": "Payment",
|
|
2298
2361
|
"verdict": "live",
|
|
@@ -2421,6 +2484,43 @@ var CATALOG = {
|
|
|
2421
2484
|
}
|
|
2422
2485
|
]
|
|
2423
2486
|
},
|
|
2487
|
+
"PayrollItemWage": {
|
|
2488
|
+
"entity": "PayrollItemWage",
|
|
2489
|
+
"verdict": "live",
|
|
2490
|
+
"group": "lists",
|
|
2491
|
+
"read": "full",
|
|
2492
|
+
"write": "none",
|
|
2493
|
+
"headline": "TenkeyBridge extension: read/query the payroll wage items (Regular Pay, Overtime Pay, ...) a TimeActivity can name; QuickBooks Desktop only",
|
|
2494
|
+
"fields": [
|
|
2495
|
+
{
|
|
2496
|
+
"qbo": "Name",
|
|
2497
|
+
"support": "full",
|
|
2498
|
+
"note": "Up to 31 characters."
|
|
2499
|
+
},
|
|
2500
|
+
{
|
|
2501
|
+
"qbo": "Active",
|
|
2502
|
+
"support": "full",
|
|
2503
|
+
"note": "Queries return active items only unless you filter on Active."
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"qbo": "WageType",
|
|
2507
|
+
"support": "full",
|
|
2508
|
+
"note": "Desktop's enum string, unchanged: Bonus, Commission, HourlyOvertime, HourlyRegular, HourlySick, HourlyVacation, SalaryRegular, SalarySick, SalaryVacation."
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"qbo": "ExpenseAccountRef",
|
|
2512
|
+
"support": "full"
|
|
2513
|
+
}
|
|
2514
|
+
],
|
|
2515
|
+
"unsupported": [
|
|
2516
|
+
{
|
|
2517
|
+
"case": "Create, update, deactivate or delete",
|
|
2518
|
+
"error": "UNSUPPORTED_BY_DESKTOP",
|
|
2519
|
+
"note": "PayrollItemWage is read-only through TenkeyBridge. Reading wage items works on a company file without a payroll subscription.",
|
|
2520
|
+
"workaround": "Create or edit the wage item in QuickBooks Desktop (Lists, Payroll Item List); it shows up on the next read."
|
|
2521
|
+
}
|
|
2522
|
+
]
|
|
2523
|
+
},
|
|
2424
2524
|
"Preferences": {
|
|
2425
2525
|
"entity": "Preferences",
|
|
2426
2526
|
"verdict": "live",
|
|
@@ -2980,7 +3080,7 @@ var CATALOG = {
|
|
|
2980
3080
|
{
|
|
2981
3081
|
"qbo": "Desktop extension reports",
|
|
2982
3082
|
"support": "full",
|
|
2983
|
-
"note": "ProfitAndLossByClass, ProfitAndLossByJob, ProfitAndLossPrevYearComp, ProfitAndLossYTDComp, BalanceSheetPrevYearComp, BalanceSheetByClass, PurchaseByVendorSummary, PurchaseByItemSummary, SalesByRepSummary, InventoryStockStatusByItem, OpenInvoices, UnpaidBillsDetail, OpenPOs, SalesByCustomerDetail, SalesByItemDetail, IncomeByCustomerDetail, ExpenseByVendorDetail, PurchaseByVendorDetail, DepositDetail, CheckDetail, BalanceSheetDetail, CollectionsReport, and since Reports wave 4 TxnDetailByAccount, UnbilledCostsByJob, AuditTrail, 1099Detail, SalesByRepDetail, PurchaseByItemDetail, OpenPOsByJob, EstimatesByJob, JobProgressInvoicesVsEstimates, OpenSalesOrderByCustomer, OpenSalesOrderByItem, PendingSales, IncomeTaxDetail, MissingChecks, SalesTaxRevenueSummary, IncomeTaxSummary, BalanceSheetSummary, InventoryStockStatusByVendor, and the Job and Time reports JobProfitabilitySummary, JobEstimatesVsActualsSummary, ItemProfitability, ItemEstimatesVsActuals, JobProfitabilityDetail, JobEstimatesVsActualsDetail, TimeByJobSummary, TimeByJobDetail, TimeByItem, TimeByName, and since Reports wave 5 PhysicalInventoryWorksheet (a bare snapshot: Desktop refuses every period, filter, basis and column option on it, so the gateway refuses them too) and the Advanced Inventory reports InventoryValuationSummaryBySite, LotNumberInStockBySite and SerialNumberInStockBySite (sent bare; a company file without Advanced Inventory answers 3250, which becomes a 422 REPORT_FEATURE_UNAVAILABLE naming the feature; not live-proven past that gate, and unavailable in the sandbox). Filters are enabled only where they were proven live on QuickBooks Enterprise 24 (2026-10-20): customer/vendor, item, class, account type, transaction type and modified date on the detail reports (not the account filter on UnbilledCostsByJob and PendingSales, which Desktop fails with an internal error), the same minus modified date on the summaries, all but vendor on the four Job summaries, customer, item and class on the Time reports; the two Job detail reports require a customer or job Id and take no other filter; MissingChecks requires account Ids (Desktop refuses a bare query and an account type, as it does ReportBasis) and takes transaction type, class, modified date and columns. 1099Detail takes no filter at all (an entity filter crashed QuickBooks, so the gateway refuses every filter on it before it reaches Desktop). The Time reports take no columns (Desktop refuses Duration). Desktop reports with no QBO twin, served under their Desktop names in the same QBO report JSON."
|
|
3083
|
+
"note": "ProfitAndLossByClass, ProfitAndLossByJob, ProfitAndLossPrevYearComp, ProfitAndLossYTDComp, BalanceSheetPrevYearComp, BalanceSheetByClass, PurchaseByVendorSummary, PurchaseByItemSummary, SalesByRepSummary, InventoryStockStatusByItem, OpenInvoices, UnpaidBillsDetail, OpenPOs, SalesByCustomerDetail, SalesByItemDetail, IncomeByCustomerDetail, ExpenseByVendorDetail, PurchaseByVendorDetail, DepositDetail, CheckDetail, BalanceSheetDetail, CollectionsReport, and since Reports wave 4 TxnDetailByAccount, UnbilledCostsByJob, AuditTrail, 1099Detail, SalesByRepDetail, PurchaseByItemDetail, OpenPOsByJob, EstimatesByJob, JobProgressInvoicesVsEstimates, OpenSalesOrderByCustomer, OpenSalesOrderByItem, PendingSales, IncomeTaxDetail, MissingChecks, SalesTaxRevenueSummary, IncomeTaxSummary, BalanceSheetSummary, InventoryStockStatusByVendor, and the Job and Time reports JobProfitabilitySummary, JobEstimatesVsActualsSummary, ItemProfitability, ItemEstimatesVsActuals, JobProfitabilityDetail, JobEstimatesVsActualsDetail, TimeByJobSummary, TimeByJobDetail, TimeByItem, TimeByName, and since Reports wave 5 PhysicalInventoryWorksheet (a bare snapshot: Desktop refuses every period, filter, basis and column option on it, so the gateway refuses them too) and the Advanced Inventory reports InventoryValuationSummaryBySite, LotNumberInStockBySite and SerialNumberInStockBySite (sent bare; a company file without Advanced Inventory answers 3250, which becomes a 422 REPORT_FEATURE_UNAVAILABLE naming the feature; not live-proven past that gate, and unavailable in the sandbox). Six payroll reports (2026-12-03): PayrollTransactionDetail, PayrollItemDetail, PayrollTransactionsByPayee and PayrollReviewDetail (PayrollDetailReportQueryRq) and PayrollSummary and EmployeeEarningsSummary (PayrollSummaryReportQueryRq). They take a period only (start_date/end_date or date_macro): no filter, column split, accounting_method or columns, because only the period was proven live, and anything else is refused before Desktop. They need a QuickBooks Desktop payroll subscription (status 3262 becomes 422 PAYROLL_SUBSCRIPTION_REQUIRED) and the integrated-application personal-data permission (status 3261 becomes 403 QB_PERSONAL_DATA_DENIED). The sandbox replays one fixed capture of each. Filters are enabled only where they were proven live on QuickBooks Enterprise 24 (2026-10-20): customer/vendor, item, class, account type, transaction type and modified date on the detail reports (not the account filter on UnbilledCostsByJob and PendingSales, which Desktop fails with an internal error), the same minus modified date on the summaries, all but vendor on the four Job summaries, customer, item and class on the Time reports; the two Job detail reports require a customer or job Id and take no other filter; MissingChecks requires account Ids (Desktop refuses a bare query and an account type, as it does ReportBasis) and takes transaction type, class, modified date and columns. 1099Detail takes no filter at all (an entity filter crashed QuickBooks, so the gateway refuses every filter on it before it reaches Desktop). The Time reports take no columns (Desktop refuses Duration). Desktop reports with no QBO twin, served under their Desktop names in the same QBO report JSON."
|
|
2984
3084
|
},
|
|
2985
3085
|
{
|
|
2986
3086
|
"qbo": "start_date / end_date / date_macro",
|
|
@@ -3713,9 +3813,8 @@ var CATALOG = {
|
|
|
3713
3813
|
},
|
|
3714
3814
|
{
|
|
3715
3815
|
"qbo": "PayrollItemRef",
|
|
3716
|
-
"support": "
|
|
3717
|
-
"note":
|
|
3718
|
-
"error": "UNSUPPORTED_BY_DESKTOP"
|
|
3816
|
+
"support": "full",
|
|
3817
|
+
"note": 'TenkeyBridge extension (QBO Accounting has no equivalent): maps to Desktop PayrollItemWageRef, read from and written to the entry as { value, name }. Pick a wage item from the PayrollItemWage list (Regular Pay, Overtime Pay, ...). Required on every entry for an employee whose "Use time data to create paychecks" is on: without it QuickBooks refuses the save (statusCode 3180, "Activities for this employee must have a payroll item"). For an employee set not to use time data it is optional and stored when sent. Vendor entries accept and store one too. A sparse update that omits it keeps the stored item; sending a different one changes it; it cannot be cleared.'
|
|
3719
3818
|
},
|
|
3720
3819
|
{
|
|
3721
3820
|
"qbo": "TxnNumber",
|
|
@@ -4049,6 +4148,36 @@ function registerResources(server) {
|
|
|
4049
4148
|
// src/tools.ts
|
|
4050
4149
|
import { ENTITIES as ENTITIES2, TenkeyBridgeApiError } from "@tenkeybridge/client";
|
|
4051
4150
|
import { z } from "zod";
|
|
4151
|
+
|
|
4152
|
+
// src/access.ts
|
|
4153
|
+
var NEEDS = {
|
|
4154
|
+
query: { op: "read" },
|
|
4155
|
+
get: { op: "read" },
|
|
4156
|
+
create: { op: "create" },
|
|
4157
|
+
update: { op: "update" },
|
|
4158
|
+
delete: { op: "delete" },
|
|
4159
|
+
void: { op: "void" },
|
|
4160
|
+
run_report: { op: "read", entity: "Report" },
|
|
4161
|
+
get_cleared_status: { op: "read", entity: "ClearedStatus" },
|
|
4162
|
+
set_cleared_status: { op: "update", entity: "ClearedStatus" }
|
|
4163
|
+
};
|
|
4164
|
+
function layerAllows(rules, op, entity) {
|
|
4165
|
+
return rules.some((r) => {
|
|
4166
|
+
if (!r.ops.includes(op)) return false;
|
|
4167
|
+
if (!entity) return true;
|
|
4168
|
+
return r.entity === "*" || r.entity === entity;
|
|
4169
|
+
});
|
|
4170
|
+
}
|
|
4171
|
+
function toolVisible(access, tool) {
|
|
4172
|
+
if (!access) return true;
|
|
4173
|
+
const need = NEEDS[tool];
|
|
4174
|
+
if (!need) return true;
|
|
4175
|
+
if (!layerAllows(access.rules, need.op, need.entity)) return false;
|
|
4176
|
+
if (access.companyRules && !layerAllows(access.companyRules, need.op, need.entity)) return false;
|
|
4177
|
+
return true;
|
|
4178
|
+
}
|
|
4179
|
+
|
|
4180
|
+
// src/tools.ts
|
|
4052
4181
|
function ok(result) {
|
|
4053
4182
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
4054
4183
|
}
|
|
@@ -4064,7 +4193,9 @@ function failure(err) {
|
|
|
4064
4193
|
code: err.code,
|
|
4065
4194
|
message: err.message,
|
|
4066
4195
|
fixes: err.tkb?.fixes,
|
|
4067
|
-
docsUrl: err.tkb?.docsUrl
|
|
4196
|
+
docsUrl: err.tkb?.docsUrl,
|
|
4197
|
+
...err.code === "SCOPE_DENIED" ? { hint: "This credential is restricted. Ask the owner of this OAuth app to widen its access in the TenkeyBridge portal. Do not retry." } : {},
|
|
4198
|
+
...err.code === "IP_NOT_ALLOWED" ? { hint: "This OAuth app only accepts calls from certain IP addresses and this server is not one of them. Ask the owner to add this server's public address under Allowed IP addresses in the TenkeyBridge portal. Do not retry or re-authorize." } : {}
|
|
4068
4199
|
},
|
|
4069
4200
|
null,
|
|
4070
4201
|
2
|
|
@@ -4099,9 +4230,12 @@ function readOnly(name) {
|
|
|
4099
4230
|
`${name} is read-only through TenkeyBridge (write: ${ENTITIES2[name].write}).` + (entry ? ` ${entry.headline}` : "") + ` Detail: compat://entity/${name.toLowerCase()}`
|
|
4100
4231
|
);
|
|
4101
4232
|
}
|
|
4102
|
-
function registerTools(server, client) {
|
|
4233
|
+
function registerTools(server, client, access) {
|
|
4234
|
+
const hide = (name, tool) => {
|
|
4235
|
+
if (!toolVisible(access, name)) tool.disable();
|
|
4236
|
+
};
|
|
4103
4237
|
const entityArg = z.string().describe('Entity name, e.g. "Invoice" or "Customer" (case-insensitive). See compat://catalog.');
|
|
4104
|
-
server.registerTool(
|
|
4238
|
+
hide("query", server.registerTool(
|
|
4105
4239
|
"query",
|
|
4106
4240
|
{
|
|
4107
4241
|
description: "Run a QBO-style query against the connected QuickBooks Desktop company file. Supports AND-joined WHERE conditions (=, !=, <, >, <=, >=, IN, LIKE; no OR) plus startPosition/maxResults paging. Check the compat://catalog resource for entity support first.",
|
|
@@ -4125,11 +4259,11 @@ function registerTools(server, client) {
|
|
|
4125
4259
|
return failure(err);
|
|
4126
4260
|
}
|
|
4127
4261
|
}
|
|
4128
|
-
);
|
|
4129
|
-
server.registerTool(
|
|
4262
|
+
));
|
|
4263
|
+
hide("run_report", server.registerTool(
|
|
4130
4264
|
"run_report",
|
|
4131
4265
|
{
|
|
4132
|
-
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, report_date, start_moddate, end_moddate. BudgetOverview and BudgetVsActuals take fiscal_year instead of dates; MissingChecks requires account, and JobProfitabilityDetail and JobEstimatesVsActualsDetail require customer. ClassSales gives income by class; TransactionListWithSplits lists every split line. Read compat://entity/reports for the available reports and which params each takes.",
|
|
4266
|
+
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, report_date, start_moddate, end_moddate. BudgetOverview and BudgetVsActuals take fiscal_year instead of dates; MissingChecks requires account, and JobProfitabilityDetail and JobEstimatesVsActualsDetail require customer. ClassSales gives income by class; TransactionListWithSplits lists every split line. The payroll reports (PayrollTransactionDetail, PayrollSummary and four more) take a period only (start_date, end_date or date_macro). Read compat://entity/reports for the available reports and which params each takes.",
|
|
4133
4267
|
inputSchema: {
|
|
4134
4268
|
report: z.string().describe('Report name, e.g. "ProfitAndLoss" (case-insensitive).'),
|
|
4135
4269
|
params: z.record(z.string()).optional().describe('Query params, e.g. { "date_macro": "Last Month" }.')
|
|
@@ -4143,8 +4277,8 @@ function registerTools(server, client) {
|
|
|
4143
4277
|
return failure(err);
|
|
4144
4278
|
}
|
|
4145
4279
|
}
|
|
4146
|
-
);
|
|
4147
|
-
server.registerTool(
|
|
4280
|
+
));
|
|
4281
|
+
hide("get", server.registerTool(
|
|
4148
4282
|
"get",
|
|
4149
4283
|
{
|
|
4150
4284
|
description: "Fetch one entity by Id (singletons like CompanyInfo and Preferences need no id).",
|
|
@@ -4166,8 +4300,8 @@ function registerTools(server, client) {
|
|
|
4166
4300
|
return failure(err);
|
|
4167
4301
|
}
|
|
4168
4302
|
}
|
|
4169
|
-
);
|
|
4170
|
-
server.registerTool(
|
|
4303
|
+
));
|
|
4304
|
+
hide("create", server.registerTool(
|
|
4171
4305
|
"create",
|
|
4172
4306
|
{
|
|
4173
4307
|
description: "Create an entity from QBO-shaped JSON (same payloads as the QuickBooks Online API). Check compat://entity/{name} for field support first.",
|
|
@@ -4186,8 +4320,8 @@ function registerTools(server, client) {
|
|
|
4186
4320
|
return failure(err);
|
|
4187
4321
|
}
|
|
4188
4322
|
}
|
|
4189
|
-
);
|
|
4190
|
-
server.registerTool(
|
|
4323
|
+
));
|
|
4324
|
+
hide("update", server.registerTool(
|
|
4191
4325
|
"update",
|
|
4192
4326
|
{
|
|
4193
4327
|
description: "Sparse-update an entity: payload must include Id plus only the fields to change.",
|
|
@@ -4209,8 +4343,8 @@ function registerTools(server, client) {
|
|
|
4209
4343
|
return failure(err);
|
|
4210
4344
|
}
|
|
4211
4345
|
}
|
|
4212
|
-
);
|
|
4213
|
-
server.registerTool(
|
|
4346
|
+
));
|
|
4347
|
+
hide("delete", server.registerTool(
|
|
4214
4348
|
"delete",
|
|
4215
4349
|
{
|
|
4216
4350
|
description: "Delete an entity by Id (SyncToken optional, as in QBO).",
|
|
@@ -4230,8 +4364,8 @@ function registerTools(server, client) {
|
|
|
4230
4364
|
return failure(err);
|
|
4231
4365
|
}
|
|
4232
4366
|
}
|
|
4233
|
-
);
|
|
4234
|
-
server.registerTool(
|
|
4367
|
+
));
|
|
4368
|
+
hide("void", server.registerTool(
|
|
4235
4369
|
"void",
|
|
4236
4370
|
{
|
|
4237
4371
|
description: 'Void a transaction by Id + SyncToken (QBO ?operation=void). Supported: Invoice, SalesReceipt, Purchase, BillPayment, and as TenkeyBridge extensions Bill, VendorCredit, Deposit, JournalEntry, InventoryAdjustment. Destructive: on QuickBooks Desktop the record stays but its totals are zeroed and its memo is prefixed "VOID:". Returns the post-void record. Fetch the current SyncToken with the get tool first.',
|
|
@@ -4254,9 +4388,9 @@ function registerTools(server, client) {
|
|
|
4254
4388
|
return failure(err);
|
|
4255
4389
|
}
|
|
4256
4390
|
}
|
|
4257
|
-
);
|
|
4391
|
+
));
|
|
4258
4392
|
const CLEARED_NEEDS = "This TenkeyBridge client has no cleared status methods; upgrade @tenkeybridge/client to 0.8.0.";
|
|
4259
|
-
server.registerTool(
|
|
4393
|
+
hide("set_cleared_status", server.registerTool(
|
|
4260
4394
|
"set_cleared_status",
|
|
4261
4395
|
{
|
|
4262
4396
|
description: "Set QuickBooks Desktop's cleared status (Cleared, NotCleared, Pending) on an existing Purchase (check), Deposit, BillPayment (check) or JournalEntry. A TenkeyBridge extension (QBO has no equivalent). With only the transaction id it sets the transaction's own bank/card side (a journal entry's first line); with line_id it sets that one line's account side, which must be a bank or other balance sheet account other than A/R and A/P (an expense or income line is refused). A Transfer cannot be cleared through the API. Setting a status is idempotent, so retrying is safe; pass request_id (and txn_type) for replay protection. Use get_cleared_status to confirm what stuck.",
|
|
@@ -4279,8 +4413,8 @@ function registerTools(server, client) {
|
|
|
4279
4413
|
return failure(err);
|
|
4280
4414
|
}
|
|
4281
4415
|
}
|
|
4282
|
-
);
|
|
4283
|
-
server.registerTool(
|
|
4416
|
+
));
|
|
4417
|
+
hide("get_cleared_status", server.registerTool(
|
|
4284
4418
|
"get_cleared_status",
|
|
4285
4419
|
{
|
|
4286
4420
|
description: "Read the cleared status of each bank / balance sheet split of one transaction (Purchase, Deposit, BillPayment, JournalEntry, or Transfer). Costs one extra bounded QuickBooks read (the transaction's own accounts on its own date). Each split has Role, LineId (to send to set_cleared_status) and ClearedStatus; SetByTxnId marks the split a set without line_id would change. Other values QuickBooks reports (such as a reconciled state) are passed through as it spells them.",
|
|
@@ -4297,17 +4431,17 @@ function registerTools(server, client) {
|
|
|
4297
4431
|
return failure(err);
|
|
4298
4432
|
}
|
|
4299
4433
|
}
|
|
4300
|
-
);
|
|
4434
|
+
));
|
|
4301
4435
|
}
|
|
4302
4436
|
|
|
4303
4437
|
// src/version.ts
|
|
4304
|
-
var PKG_VERSION = "0.
|
|
4438
|
+
var PKG_VERSION = "0.10.0";
|
|
4305
4439
|
|
|
4306
4440
|
// src/server.ts
|
|
4307
4441
|
var SERVER_NAME = "tenkeybridge";
|
|
4308
|
-
function buildServer(client) {
|
|
4442
|
+
function buildServer(client, access) {
|
|
4309
4443
|
const server = new McpServer2({ name: SERVER_NAME, version: PKG_VERSION });
|
|
4310
|
-
registerTools(server, client);
|
|
4444
|
+
registerTools(server, client, access);
|
|
4311
4445
|
registerResources(server);
|
|
4312
4446
|
return server;
|
|
4313
4447
|
}
|
|
@@ -4334,7 +4468,8 @@ async function main() {
|
|
|
4334
4468
|
});
|
|
4335
4469
|
const _seamCheck = client.query.bind(client);
|
|
4336
4470
|
void _seamCheck;
|
|
4337
|
-
const
|
|
4471
|
+
const access = await client.access().catch(() => void 0);
|
|
4472
|
+
const server = buildServer(client, access);
|
|
4338
4473
|
await server.connect(new StdioServerTransport());
|
|
4339
4474
|
console.error(`tenkeybridge-mcp: serving company ${config.companyId}`);
|
|
4340
4475
|
}
|