@tryfinch/finch-api-mcp 6.27.0 → 6.29.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 +77 -3
- package/compat.d.mts +52 -0
- package/compat.d.mts.map +1 -0
- package/compat.d.ts +52 -0
- package/compat.d.ts.map +1 -0
- package/compat.js +342 -0
- package/compat.js.map +1 -0
- package/compat.mjs +332 -0
- package/compat.mjs.map +1 -0
- package/dynamic-tools.d.mts +12 -0
- package/dynamic-tools.d.mts.map +1 -0
- package/dynamic-tools.d.ts +12 -0
- package/dynamic-tools.d.ts.map +1 -0
- package/dynamic-tools.js +133 -0
- package/dynamic-tools.js.map +1 -0
- package/dynamic-tools.mjs +130 -0
- package/dynamic-tools.mjs.map +1 -0
- package/index.js +40 -116
- package/index.js.map +1 -1
- package/index.mjs +42 -115
- package/index.mjs.map +1 -1
- package/options.d.mts +11 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +11 -0
- package/options.d.ts.map +1 -0
- package/options.js +337 -0
- package/options.js.map +1 -0
- package/options.mjs +331 -0
- package/options.mjs.map +1 -0
- package/package.json +6 -3
- package/server.d.mts +9 -2
- package/server.d.mts.map +1 -1
- package/server.d.ts +9 -2
- package/server.d.ts.map +1 -1
- package/server.js +34 -11
- package/server.js.map +1 -1
- package/server.mjs +31 -9
- package/server.mjs.map +1 -1
- package/src/compat.ts +429 -0
- package/src/dynamic-tools.ts +152 -0
- package/src/index.ts +42 -130
- package/src/options.ts +361 -0
- package/src/server.ts +46 -11
- package/src/tools/access-tokens/create-access-tokens.ts +2 -2
- package/src/tools/account/disconnect-account.ts +1 -2
- package/src/tools/account/introspect-account.ts +1 -2
- package/src/tools/connect/sessions/new-connect-sessions.ts +2 -2
- package/src/tools/connect/sessions/reauthenticate-connect-sessions.ts +2 -2
- package/src/tools/hris/benefits/create-hris-benefits.ts +38 -3
- package/src/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.ts +2 -2
- package/src/tools/hris/benefits/list-hris-benefits.ts +1 -2
- package/src/tools/hris/benefits/list-supported-benefits-hris-benefits.ts +1 -2
- package/src/tools/hris/benefits/retrieve-hris-benefits.ts +2 -2
- package/src/tools/hris/benefits/update-hris-benefits.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.ts +2 -2
- package/src/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.ts +1 -2
- package/src/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.ts +2 -2
- package/src/tools/hris/company/retrieve-hris-company.ts +1 -2
- package/src/tools/hris/directory/list-hris-directory.ts +2 -2
- package/src/tools/hris/directory/list-individuals-hris-directory.ts +2 -2
- package/src/tools/hris/documents/list-hris-documents.ts +2 -2
- package/src/tools/hris/documents/retreive-hris-documents.ts +2 -2
- package/src/tools/hris/employments/retrieve-many-hris-employments.ts +2 -2
- package/src/tools/hris/individuals/retrieve-many-hris-individuals.ts +2 -2
- package/src/tools/hris/pay-statements/retrieve-many-hris-pay-statements.ts +2 -2
- package/src/tools/hris/payments/list-hris-payments.ts +2 -2
- package/src/tools/index.ts +16 -6
- package/src/tools/jobs/automated/create-jobs-automated.ts +2 -2
- package/src/tools/jobs/automated/list-jobs-automated.ts +2 -2
- package/src/tools/jobs/automated/retrieve-jobs-automated.ts +2 -2
- package/src/tools/jobs/manual/retrieve-jobs-manual.ts +2 -2
- package/src/tools/payroll/pay-groups/list-payroll-pay-groups.ts +2 -2
- package/src/tools/payroll/pay-groups/retrieve-payroll-pay-groups.ts +2 -2
- package/src/tools/providers/list-providers.ts +1 -2
- package/src/tools/request-forwarding/forward-request-forwarding.ts +2 -2
- package/src/tools/sandbox/company/update-sandbox-company.ts +42 -37
- package/src/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.ts +2 -2
- package/src/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.ts +7 -2
- package/src/tools/sandbox/connections/create-sandbox-connections.ts +2 -2
- package/src/tools/sandbox/directory/create-sandbox-directory.ts +82 -74
- package/src/tools/sandbox/employment/update-sandbox-employment.ts +62 -54
- package/src/tools/sandbox/individual/update-sandbox-individual.ts +19 -14
- package/src/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.ts +1 -2
- package/src/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.ts +2 -2
- package/src/tools/sandbox/jobs/create-sandbox-jobs.ts +2 -2
- package/src/tools/sandbox/payment/create-sandbox-payment.ts +49 -41
- package/tools/access-tokens/create-access-tokens.d.mts +10 -2
- package/tools/access-tokens/create-access-tokens.d.mts.map +1 -1
- package/tools/access-tokens/create-access-tokens.d.ts +10 -2
- package/tools/access-tokens/create-access-tokens.d.ts.map +1 -1
- package/tools/access-tokens/create-access-tokens.js +1 -1
- package/tools/access-tokens/create-access-tokens.js.map +1 -1
- package/tools/access-tokens/create-access-tokens.mjs +1 -1
- package/tools/access-tokens/create-access-tokens.mjs.map +1 -1
- package/tools/account/disconnect-account.d.mts +10 -2
- package/tools/account/disconnect-account.d.mts.map +1 -1
- package/tools/account/disconnect-account.d.ts +10 -2
- package/tools/account/disconnect-account.d.ts.map +1 -1
- package/tools/account/disconnect-account.js +0 -1
- package/tools/account/disconnect-account.js.map +1 -1
- package/tools/account/disconnect-account.mjs +0 -1
- package/tools/account/disconnect-account.mjs.map +1 -1
- package/tools/account/introspect-account.d.mts +10 -2
- package/tools/account/introspect-account.d.mts.map +1 -1
- package/tools/account/introspect-account.d.ts +10 -2
- package/tools/account/introspect-account.d.ts.map +1 -1
- package/tools/account/introspect-account.js +0 -1
- package/tools/account/introspect-account.js.map +1 -1
- package/tools/account/introspect-account.mjs +0 -1
- package/tools/account/introspect-account.mjs.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.d.mts +10 -2
- package/tools/connect/sessions/new-connect-sessions.d.mts.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.d.ts +10 -2
- package/tools/connect/sessions/new-connect-sessions.d.ts.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.js +1 -1
- package/tools/connect/sessions/new-connect-sessions.js.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.mjs +1 -1
- package/tools/connect/sessions/new-connect-sessions.mjs.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts +10 -2
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts +10 -2
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.js +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.js.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.mjs +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.mjs.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/create-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/create-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.js +37 -2
- package/tools/hris/benefits/create-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.mjs +37 -2
- package/tools/hris/benefits/create-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs +1 -1
- package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts +10 -2
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts +10 -2
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.js.map +1 -1
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/list-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/list-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.js +0 -1
- package/tools/hris/benefits/list-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.mjs +0 -1
- package/tools/hris/benefits/list-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.js +0 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs +0 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/retrieve-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/retrieve-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.js +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.mjs +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.d.mts +10 -2
- package/tools/hris/benefits/update-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.d.ts +10 -2
- package/tools/hris/benefits/update-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js.map +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs +1 -1
- package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs +1 -1
- package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs +1 -1
- package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js +0 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs +0 -1
- package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts +10 -2
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts +10 -2
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.js.map +1 -1
- package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.mjs.map +1 -1
- package/tools/hris/company/retrieve-hris-company.d.mts +10 -2
- package/tools/hris/company/retrieve-hris-company.d.mts.map +1 -1
- package/tools/hris/company/retrieve-hris-company.d.ts +10 -2
- package/tools/hris/company/retrieve-hris-company.d.ts.map +1 -1
- package/tools/hris/company/retrieve-hris-company.js +0 -1
- package/tools/hris/company/retrieve-hris-company.js.map +1 -1
- package/tools/hris/company/retrieve-hris-company.mjs +0 -1
- package/tools/hris/company/retrieve-hris-company.mjs.map +1 -1
- package/tools/hris/directory/list-hris-directory.d.mts +10 -2
- package/tools/hris/directory/list-hris-directory.d.mts.map +1 -1
- package/tools/hris/directory/list-hris-directory.d.ts +10 -2
- package/tools/hris/directory/list-hris-directory.d.ts.map +1 -1
- package/tools/hris/directory/list-hris-directory.js +1 -1
- package/tools/hris/directory/list-hris-directory.js.map +1 -1
- package/tools/hris/directory/list-hris-directory.mjs +1 -1
- package/tools/hris/directory/list-hris-directory.mjs.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.d.mts +10 -2
- package/tools/hris/directory/list-individuals-hris-directory.d.mts.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.d.ts +10 -2
- package/tools/hris/directory/list-individuals-hris-directory.d.ts.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.js +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.js.map +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.mjs +1 -1
- package/tools/hris/directory/list-individuals-hris-directory.mjs.map +1 -1
- package/tools/hris/documents/list-hris-documents.d.mts +10 -2
- package/tools/hris/documents/list-hris-documents.d.mts.map +1 -1
- package/tools/hris/documents/list-hris-documents.d.ts +10 -2
- package/tools/hris/documents/list-hris-documents.d.ts.map +1 -1
- package/tools/hris/documents/list-hris-documents.js +1 -1
- package/tools/hris/documents/list-hris-documents.js.map +1 -1
- package/tools/hris/documents/list-hris-documents.mjs +1 -1
- package/tools/hris/documents/list-hris-documents.mjs.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.d.mts +10 -2
- package/tools/hris/documents/retreive-hris-documents.d.mts.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.d.ts +10 -2
- package/tools/hris/documents/retreive-hris-documents.d.ts.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.js +1 -1
- package/tools/hris/documents/retreive-hris-documents.js.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.mjs +1 -1
- package/tools/hris/documents/retreive-hris-documents.mjs.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.d.mts +10 -2
- package/tools/hris/employments/retrieve-many-hris-employments.d.mts.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.d.ts +10 -2
- package/tools/hris/employments/retrieve-many-hris-employments.d.ts.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.js +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.js.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.mjs +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.mjs.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts +10 -2
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts +10 -2
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.js +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.js.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.mjs +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.mjs.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts +10 -2
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts +10 -2
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs.map +1 -1
- package/tools/hris/payments/list-hris-payments.d.mts +10 -2
- package/tools/hris/payments/list-hris-payments.d.mts.map +1 -1
- package/tools/hris/payments/list-hris-payments.d.ts +10 -2
- package/tools/hris/payments/list-hris-payments.d.ts.map +1 -1
- package/tools/hris/payments/list-hris-payments.js +1 -1
- package/tools/hris/payments/list-hris-payments.js.map +1 -1
- package/tools/hris/payments/list-hris-payments.mjs +1 -1
- package/tools/hris/payments/list-hris-payments.mjs.map +1 -1
- package/tools/index.d.mts +1 -1
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts +1 -1
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +13 -7
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +11 -5
- package/tools/index.mjs.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.d.mts +10 -2
- package/tools/jobs/automated/create-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.d.ts +10 -2
- package/tools/jobs/automated/create-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.js +1 -1
- package/tools/jobs/automated/create-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.mjs +1 -1
- package/tools/jobs/automated/create-jobs-automated.mjs.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.d.mts +10 -2
- package/tools/jobs/automated/list-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.d.ts +10 -2
- package/tools/jobs/automated/list-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.js +1 -1
- package/tools/jobs/automated/list-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.mjs +1 -1
- package/tools/jobs/automated/list-jobs-automated.mjs.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.d.mts +10 -2
- package/tools/jobs/automated/retrieve-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.d.ts +10 -2
- package/tools/jobs/automated/retrieve-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.js +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.mjs +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.mjs.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.d.mts +10 -2
- package/tools/jobs/manual/retrieve-jobs-manual.d.mts.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.d.ts +10 -2
- package/tools/jobs/manual/retrieve-jobs-manual.d.ts.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.js +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.js.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.mjs +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.mjs.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts +10 -2
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts +10 -2
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.js +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.js.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts +10 -2
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts +10 -2
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs.map +1 -1
- package/tools/providers/list-providers.d.mts +10 -2
- package/tools/providers/list-providers.d.mts.map +1 -1
- package/tools/providers/list-providers.d.ts +10 -2
- package/tools/providers/list-providers.d.ts.map +1 -1
- package/tools/providers/list-providers.js +0 -1
- package/tools/providers/list-providers.js.map +1 -1
- package/tools/providers/list-providers.mjs +0 -1
- package/tools/providers/list-providers.mjs.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.d.mts +10 -2
- package/tools/request-forwarding/forward-request-forwarding.d.mts.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.d.ts +10 -2
- package/tools/request-forwarding/forward-request-forwarding.d.ts.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.js +1 -1
- package/tools/request-forwarding/forward-request-forwarding.js.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.mjs +1 -1
- package/tools/request-forwarding/forward-request-forwarding.mjs.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.d.mts +10 -2
- package/tools/sandbox/company/update-sandbox-company.d.mts.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.d.ts +10 -2
- package/tools/sandbox/company/update-sandbox-company.d.ts.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.js +41 -36
- package/tools/sandbox/company/update-sandbox-company.js.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.mjs +41 -36
- package/tools/sandbox/company/update-sandbox-company.mjs.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts +10 -2
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts +10 -2
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts +10 -2
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts +10 -2
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js +6 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs +6 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.d.mts +10 -2
- package/tools/sandbox/connections/create-sandbox-connections.d.mts.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.d.ts +10 -2
- package/tools/sandbox/connections/create-sandbox-connections.d.ts.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.js +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.js.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.mjs +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.mjs.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.d.mts +10 -2
- package/tools/sandbox/directory/create-sandbox-directory.d.mts.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.d.ts +10 -2
- package/tools/sandbox/directory/create-sandbox-directory.d.ts.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.js +79 -71
- package/tools/sandbox/directory/create-sandbox-directory.js.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.mjs +79 -71
- package/tools/sandbox/directory/create-sandbox-directory.mjs.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.d.mts +10 -2
- package/tools/sandbox/employment/update-sandbox-employment.d.mts.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.d.ts +10 -2
- package/tools/sandbox/employment/update-sandbox-employment.d.ts.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.js +60 -52
- package/tools/sandbox/employment/update-sandbox-employment.js.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.mjs +60 -52
- package/tools/sandbox/employment/update-sandbox-employment.mjs.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.d.mts +10 -2
- package/tools/sandbox/individual/update-sandbox-individual.d.mts.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.d.ts +10 -2
- package/tools/sandbox/individual/update-sandbox-individual.d.ts.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.js +16 -11
- package/tools/sandbox/individual/update-sandbox-individual.js.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.mjs +16 -11
- package/tools/sandbox/individual/update-sandbox-individual.mjs.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts +10 -2
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts +10 -2
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js +0 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs +0 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts +10 -2
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts +10 -2
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.d.mts +10 -2
- package/tools/sandbox/jobs/create-sandbox-jobs.d.mts.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.d.ts +10 -2
- package/tools/sandbox/jobs/create-sandbox-jobs.d.ts.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.js +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.js.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.mjs +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.mjs.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.d.mts +10 -2
- package/tools/sandbox/payment/create-sandbox-payment.d.mts.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.d.ts +10 -2
- package/tools/sandbox/payment/create-sandbox-payment.d.ts.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.js +48 -40
- package/tools/sandbox/payment/create-sandbox-payment.js.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.mjs +48 -40
- package/tools/sandbox/payment/create-sandbox-payment.mjs.map +1 -1
package/src/index.ts
CHANGED
|
@@ -1,115 +1,24 @@
|
|
|
1
1
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { endpoints, Filter, query } from './tools';
|
|
2
|
+
import { init, selectTools, server } from './server';
|
|
3
|
+
import { Endpoint, endpoints } from './tools';
|
|
4
|
+
import { ParsedOptions, parseOptions } from './options';
|
|
6
5
|
|
|
7
6
|
async function main() {
|
|
8
|
-
const
|
|
9
|
-
.option('tool', {
|
|
10
|
-
type: 'string',
|
|
11
|
-
array: true,
|
|
12
|
-
description: 'Include tools matching the specified names',
|
|
13
|
-
})
|
|
14
|
-
.option('resource', {
|
|
15
|
-
type: 'string',
|
|
16
|
-
array: true,
|
|
17
|
-
description: 'Include tools matching the specified resources',
|
|
18
|
-
})
|
|
19
|
-
.option('operation', {
|
|
20
|
-
type: 'string',
|
|
21
|
-
array: true,
|
|
22
|
-
choices: ['read', 'write'],
|
|
23
|
-
description: 'Include tools matching the specified operations',
|
|
24
|
-
})
|
|
25
|
-
.option('tag', {
|
|
26
|
-
type: 'string',
|
|
27
|
-
array: true,
|
|
28
|
-
description: 'Include tools with the specified tags',
|
|
29
|
-
})
|
|
30
|
-
.option('no-tool', {
|
|
31
|
-
type: 'string',
|
|
32
|
-
array: true,
|
|
33
|
-
description: 'Exclude tools matching the specified names',
|
|
34
|
-
})
|
|
35
|
-
.option('no-resource', {
|
|
36
|
-
type: 'string',
|
|
37
|
-
array: true,
|
|
38
|
-
description: 'Exclude tools matching the specified resources',
|
|
39
|
-
})
|
|
40
|
-
.option('no-operation', {
|
|
41
|
-
type: 'string',
|
|
42
|
-
array: true,
|
|
43
|
-
description: 'Exclude tools matching the specified operations',
|
|
44
|
-
})
|
|
45
|
-
.option('no-tag', {
|
|
46
|
-
type: 'string',
|
|
47
|
-
array: true,
|
|
48
|
-
description: 'Exclude tools with the specified tags',
|
|
49
|
-
})
|
|
50
|
-
.option('list', {
|
|
51
|
-
type: 'boolean',
|
|
52
|
-
description: 'List all tools and exit',
|
|
53
|
-
})
|
|
54
|
-
.help();
|
|
55
|
-
|
|
56
|
-
for (const [command, desc] of examples()) {
|
|
57
|
-
opts.example(command, desc);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const argv = opts.parseSync();
|
|
7
|
+
const options = parseOptionsOrError();
|
|
61
8
|
|
|
62
|
-
if (
|
|
9
|
+
if (options.list) {
|
|
63
10
|
listAllTools();
|
|
64
11
|
return;
|
|
65
12
|
}
|
|
66
|
-
const filters: Filter[] = [];
|
|
67
13
|
|
|
68
|
-
|
|
69
|
-
filters.push({ type: 'tag', op: 'include', value: tag });
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
for (const tag of argv.noTag || []) {
|
|
73
|
-
filters.push({ type: 'tag', op: 'exclude', value: tag });
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
for (const resource of argv.resource || []) {
|
|
77
|
-
filters.push({ type: 'resource', op: 'include', value: resource });
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
for (const resource of argv.noResource || []) {
|
|
81
|
-
filters.push({ type: 'resource', op: 'exclude', value: resource });
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
for (const tool of argv.tool || []) {
|
|
85
|
-
filters.push({ type: 'tool', op: 'include', value: tool });
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
for (const tool of argv.noTool || []) {
|
|
89
|
-
filters.push({ type: 'tool', op: 'exclude', value: tool });
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
for (const operation of argv.operation || []) {
|
|
93
|
-
filters.push({ type: 'operation', op: 'include', value: operation });
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
for (const operation of argv.noOperation || []) {
|
|
97
|
-
filters.push({ type: 'operation', op: 'exclude', value: operation });
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const filteredEndpoints = query(filters, endpoints);
|
|
101
|
-
|
|
102
|
-
if (filteredEndpoints.length === 0) {
|
|
103
|
-
console.error('No tools match the provided filters.');
|
|
104
|
-
process.exit(1);
|
|
105
|
-
}
|
|
14
|
+
const includedTools = selectToolsOrError(endpoints, options);
|
|
106
15
|
|
|
107
16
|
console.error(
|
|
108
|
-
`MCP Server starting with ${
|
|
109
|
-
|
|
17
|
+
`MCP Server starting with ${includedTools.length} tools:`,
|
|
18
|
+
includedTools.map((e) => e.tool.name),
|
|
110
19
|
);
|
|
111
20
|
|
|
112
|
-
init({ server, endpoints:
|
|
21
|
+
init({ server, endpoints: includedTools });
|
|
113
22
|
|
|
114
23
|
const transport = new StdioServerTransport();
|
|
115
24
|
await server.connect(transport);
|
|
@@ -123,12 +32,39 @@ if (require.main === module) {
|
|
|
123
32
|
});
|
|
124
33
|
}
|
|
125
34
|
|
|
35
|
+
function parseOptionsOrError() {
|
|
36
|
+
try {
|
|
37
|
+
return parseOptions();
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error('Error parsing options:', error);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function selectToolsOrError(endpoints: Endpoint[], options: ParsedOptions) {
|
|
45
|
+
try {
|
|
46
|
+
const includedTools = selectTools(endpoints, options);
|
|
47
|
+
if (includedTools.length === 0) {
|
|
48
|
+
console.error('No tools match the provided filters.');
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
return includedTools;
|
|
52
|
+
} catch (error) {
|
|
53
|
+
if (error instanceof Error) {
|
|
54
|
+
console.error('Error filtering tools:', error.message);
|
|
55
|
+
} else {
|
|
56
|
+
console.error('Error filtering tools:', error);
|
|
57
|
+
}
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
126
62
|
function listAllTools() {
|
|
127
63
|
if (endpoints.length === 0) {
|
|
128
|
-
console.
|
|
64
|
+
console.log('No tools available.');
|
|
129
65
|
return;
|
|
130
66
|
}
|
|
131
|
-
console.
|
|
67
|
+
console.log('Available tools:\n');
|
|
132
68
|
|
|
133
69
|
// Group endpoints by resource
|
|
134
70
|
const resourceGroups = new Map<string, typeof endpoints>();
|
|
@@ -146,7 +82,7 @@ function listAllTools() {
|
|
|
146
82
|
|
|
147
83
|
// Display hierarchically by resource
|
|
148
84
|
for (const resource of sortedResources) {
|
|
149
|
-
console.
|
|
85
|
+
console.log(`Resource: ${resource}`);
|
|
150
86
|
|
|
151
87
|
const resourceEndpoints = resourceGroups.get(resource)!;
|
|
152
88
|
// Sort endpoints by tool name
|
|
@@ -158,33 +94,9 @@ function listAllTools() {
|
|
|
158
94
|
metadata: { operation, tags },
|
|
159
95
|
} = endpoint;
|
|
160
96
|
|
|
161
|
-
console.
|
|
162
|
-
console.
|
|
97
|
+
console.log(` - ${tool.name} (${operation}) ${tags.length > 0 ? `tags: ${tags.join(', ')}` : ''}`);
|
|
98
|
+
console.log(` Description: ${tool.description}`);
|
|
163
99
|
}
|
|
164
|
-
console.
|
|
100
|
+
console.log('');
|
|
165
101
|
}
|
|
166
102
|
}
|
|
167
|
-
|
|
168
|
-
function examples(): [string, string][] {
|
|
169
|
-
const firstEndpoint = endpoints[0]!;
|
|
170
|
-
const secondEndpoint =
|
|
171
|
-
endpoints.find((e) => e.metadata.resource !== firstEndpoint.metadata.resource) || endpoints[1];
|
|
172
|
-
const tag = endpoints.find((e) => e.metadata.tags.length > 0)?.metadata.tags[0];
|
|
173
|
-
const otherEndpoint = secondEndpoint || firstEndpoint;
|
|
174
|
-
|
|
175
|
-
return [
|
|
176
|
-
[
|
|
177
|
-
`--tool="${firstEndpoint.tool.name}" ${secondEndpoint ? `--tool="${secondEndpoint.tool.name}"` : ''}`,
|
|
178
|
-
'Include tools by name',
|
|
179
|
-
],
|
|
180
|
-
[
|
|
181
|
-
`--resource="${firstEndpoint.metadata.resource}" --operation="read"`,
|
|
182
|
-
'Filter by resource and operation',
|
|
183
|
-
],
|
|
184
|
-
[
|
|
185
|
-
`--resource="${otherEndpoint.metadata.resource}*" --no-tool="${otherEndpoint.tool.name}"`,
|
|
186
|
-
'Use resource wildcards and exclusions',
|
|
187
|
-
],
|
|
188
|
-
...(tag ? [[`--tag="${tag}"`, 'Filter based on tags'] as [string, string]] : []),
|
|
189
|
-
];
|
|
190
|
-
}
|
package/src/options.ts
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import yargs from 'yargs';
|
|
2
|
+
import { hideBin } from 'yargs/helpers';
|
|
3
|
+
import { endpoints, Filter } from './tools';
|
|
4
|
+
import { ClientCapabilities } from './compat';
|
|
5
|
+
|
|
6
|
+
type ClientType = 'openai-agents' | 'claude' | 'claude-code' | 'cursor';
|
|
7
|
+
|
|
8
|
+
// Client presets for compatibility
|
|
9
|
+
// Note that these could change over time as models get better, so this is
|
|
10
|
+
// a best effort.
|
|
11
|
+
const CLIENT_PRESETS: Record<ClientType, ClientCapabilities> = {
|
|
12
|
+
'openai-agents': {
|
|
13
|
+
topLevelUnions: false,
|
|
14
|
+
validJson: true,
|
|
15
|
+
refs: true,
|
|
16
|
+
unions: true,
|
|
17
|
+
formats: true,
|
|
18
|
+
toolNameLength: undefined,
|
|
19
|
+
},
|
|
20
|
+
claude: {
|
|
21
|
+
topLevelUnions: true,
|
|
22
|
+
validJson: false,
|
|
23
|
+
refs: true,
|
|
24
|
+
unions: true,
|
|
25
|
+
formats: true,
|
|
26
|
+
toolNameLength: undefined,
|
|
27
|
+
},
|
|
28
|
+
'claude-code': {
|
|
29
|
+
topLevelUnions: false,
|
|
30
|
+
validJson: true,
|
|
31
|
+
refs: true,
|
|
32
|
+
unions: true,
|
|
33
|
+
formats: true,
|
|
34
|
+
toolNameLength: undefined,
|
|
35
|
+
},
|
|
36
|
+
cursor: {
|
|
37
|
+
topLevelUnions: false,
|
|
38
|
+
validJson: true,
|
|
39
|
+
refs: false,
|
|
40
|
+
unions: false,
|
|
41
|
+
formats: false,
|
|
42
|
+
toolNameLength: 50,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export interface ParsedOptions {
|
|
47
|
+
includeDynamicTools: boolean | undefined;
|
|
48
|
+
includeAllTools: boolean | undefined;
|
|
49
|
+
filters: Filter[];
|
|
50
|
+
capabilities: ClientCapabilities;
|
|
51
|
+
list: boolean;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const CAPABILITY_CHOICES = [
|
|
55
|
+
'top-level-unions',
|
|
56
|
+
'valid-json',
|
|
57
|
+
'refs',
|
|
58
|
+
'unions',
|
|
59
|
+
'formats',
|
|
60
|
+
'tool-name-length',
|
|
61
|
+
] as const;
|
|
62
|
+
|
|
63
|
+
type Capability = (typeof CAPABILITY_CHOICES)[number];
|
|
64
|
+
|
|
65
|
+
function parseCapabilityValue(cap: string): { name: Capability; value?: number } {
|
|
66
|
+
if (cap.startsWith('tool-name-length=')) {
|
|
67
|
+
const parts = cap.split('=');
|
|
68
|
+
if (parts.length === 2) {
|
|
69
|
+
const length = parseInt(parts[1]!, 10);
|
|
70
|
+
if (!isNaN(length)) {
|
|
71
|
+
return { name: 'tool-name-length', value: length };
|
|
72
|
+
}
|
|
73
|
+
throw new Error(`Invalid tool-name-length value: ${parts[1]}. Expected a number.`);
|
|
74
|
+
}
|
|
75
|
+
throw new Error(`Invalid format for tool-name-length. Expected tool-name-length=N.`);
|
|
76
|
+
}
|
|
77
|
+
if (!CAPABILITY_CHOICES.includes(cap as Capability)) {
|
|
78
|
+
throw new Error(`Unknown capability: ${cap}. Valid capabilities are: ${CAPABILITY_CHOICES.join(', ')}`);
|
|
79
|
+
}
|
|
80
|
+
return { name: cap as Capability };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function parseOptions(): ParsedOptions {
|
|
84
|
+
const opts = yargs(hideBin(process.argv))
|
|
85
|
+
.option('tools', {
|
|
86
|
+
type: 'string',
|
|
87
|
+
array: true,
|
|
88
|
+
choices: ['dynamic', 'all'],
|
|
89
|
+
description: 'Use dynamic tools or all tools',
|
|
90
|
+
})
|
|
91
|
+
.option('no-tools', {
|
|
92
|
+
type: 'string',
|
|
93
|
+
array: true,
|
|
94
|
+
choices: ['dynamic', 'all'],
|
|
95
|
+
description: 'Do not use any dynamic or all tools',
|
|
96
|
+
})
|
|
97
|
+
.option('tool', {
|
|
98
|
+
type: 'string',
|
|
99
|
+
array: true,
|
|
100
|
+
description: 'Include tools matching the specified names',
|
|
101
|
+
})
|
|
102
|
+
.option('resource', {
|
|
103
|
+
type: 'string',
|
|
104
|
+
array: true,
|
|
105
|
+
description: 'Include tools matching the specified resources',
|
|
106
|
+
})
|
|
107
|
+
.option('operation', {
|
|
108
|
+
type: 'string',
|
|
109
|
+
array: true,
|
|
110
|
+
choices: ['read', 'write'],
|
|
111
|
+
description: 'Include tools matching the specified operations',
|
|
112
|
+
})
|
|
113
|
+
.option('tag', {
|
|
114
|
+
type: 'string',
|
|
115
|
+
array: true,
|
|
116
|
+
description: 'Include tools with the specified tags',
|
|
117
|
+
})
|
|
118
|
+
.option('no-tool', {
|
|
119
|
+
type: 'string',
|
|
120
|
+
array: true,
|
|
121
|
+
description: 'Exclude tools matching the specified names',
|
|
122
|
+
})
|
|
123
|
+
.option('no-resource', {
|
|
124
|
+
type: 'string',
|
|
125
|
+
array: true,
|
|
126
|
+
description: 'Exclude tools matching the specified resources',
|
|
127
|
+
})
|
|
128
|
+
.option('no-operation', {
|
|
129
|
+
type: 'string',
|
|
130
|
+
array: true,
|
|
131
|
+
description: 'Exclude tools matching the specified operations',
|
|
132
|
+
})
|
|
133
|
+
.option('no-tag', {
|
|
134
|
+
type: 'string',
|
|
135
|
+
array: true,
|
|
136
|
+
description: 'Exclude tools with the specified tags',
|
|
137
|
+
})
|
|
138
|
+
.option('list', {
|
|
139
|
+
type: 'boolean',
|
|
140
|
+
description: 'List all tools and exit',
|
|
141
|
+
})
|
|
142
|
+
.option('client', {
|
|
143
|
+
type: 'string',
|
|
144
|
+
choices: Object.keys(CLIENT_PRESETS),
|
|
145
|
+
description: 'Specify the MCP client being used',
|
|
146
|
+
})
|
|
147
|
+
.option('capability', {
|
|
148
|
+
type: 'string',
|
|
149
|
+
array: true,
|
|
150
|
+
description: 'Specify client capabilities',
|
|
151
|
+
coerce: (values: string[]) => {
|
|
152
|
+
return values.flatMap((v) => v.split(','));
|
|
153
|
+
},
|
|
154
|
+
})
|
|
155
|
+
.option('no-capability', {
|
|
156
|
+
type: 'string',
|
|
157
|
+
array: true,
|
|
158
|
+
description: 'Unset client capabilities',
|
|
159
|
+
choices: CAPABILITY_CHOICES,
|
|
160
|
+
coerce: (values: string[]) => {
|
|
161
|
+
return values.flatMap((v) => v.split(','));
|
|
162
|
+
},
|
|
163
|
+
})
|
|
164
|
+
.option('describe-capabilities', {
|
|
165
|
+
type: 'boolean',
|
|
166
|
+
description: 'Print detailed explanation of client capabilities and exit',
|
|
167
|
+
})
|
|
168
|
+
.help();
|
|
169
|
+
|
|
170
|
+
for (const [command, desc] of examples()) {
|
|
171
|
+
opts.example(command, desc);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const argv = opts.parseSync();
|
|
175
|
+
|
|
176
|
+
// Handle describe-capabilities flag
|
|
177
|
+
if (argv.describeCapabilities) {
|
|
178
|
+
console.log(getCapabilitiesExplanation());
|
|
179
|
+
process.exit(0);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const filters: Filter[] = [];
|
|
183
|
+
|
|
184
|
+
// Helper function to support comma-separated values
|
|
185
|
+
const splitValues = (values: string[] | undefined): string[] => {
|
|
186
|
+
if (!values) return [];
|
|
187
|
+
return values.flatMap((v) => v.split(','));
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
for (const tag of splitValues(argv.tag)) {
|
|
191
|
+
filters.push({ type: 'tag', op: 'include', value: tag });
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
for (const tag of splitValues(argv.noTag)) {
|
|
195
|
+
filters.push({ type: 'tag', op: 'exclude', value: tag });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
for (const resource of splitValues(argv.resource)) {
|
|
199
|
+
filters.push({ type: 'resource', op: 'include', value: resource });
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
for (const resource of splitValues(argv.noResource)) {
|
|
203
|
+
filters.push({ type: 'resource', op: 'exclude', value: resource });
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
for (const tool of splitValues(argv.tool)) {
|
|
207
|
+
filters.push({ type: 'tool', op: 'include', value: tool });
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
for (const tool of splitValues(argv.noTool)) {
|
|
211
|
+
filters.push({ type: 'tool', op: 'exclude', value: tool });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
for (const operation of splitValues(argv.operation)) {
|
|
215
|
+
filters.push({ type: 'operation', op: 'include', value: operation });
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
for (const operation of splitValues(argv.noOperation)) {
|
|
219
|
+
filters.push({ type: 'operation', op: 'exclude', value: operation });
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Parse client capabilities
|
|
223
|
+
const clientCapabilities: ClientCapabilities = {
|
|
224
|
+
topLevelUnions: true,
|
|
225
|
+
validJson: true,
|
|
226
|
+
refs: true,
|
|
227
|
+
unions: true,
|
|
228
|
+
formats: true,
|
|
229
|
+
toolNameLength: undefined,
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// Apply client preset if specified
|
|
233
|
+
if (typeof argv.client === 'string') {
|
|
234
|
+
const clientKey = argv.client as ClientType;
|
|
235
|
+
if (CLIENT_PRESETS[clientKey]) {
|
|
236
|
+
Object.assign(clientCapabilities, CLIENT_PRESETS[clientKey]);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Apply individual capability overrides
|
|
241
|
+
if (Array.isArray(argv.capability)) {
|
|
242
|
+
for (const cap of argv.capability) {
|
|
243
|
+
const parsedCap = parseCapabilityValue(cap);
|
|
244
|
+
if (parsedCap.name === 'top-level-unions') {
|
|
245
|
+
clientCapabilities.topLevelUnions = true;
|
|
246
|
+
} else if (parsedCap.name === 'valid-json') {
|
|
247
|
+
clientCapabilities.validJson = true;
|
|
248
|
+
} else if (parsedCap.name === 'refs') {
|
|
249
|
+
clientCapabilities.refs = true;
|
|
250
|
+
} else if (parsedCap.name === 'unions') {
|
|
251
|
+
clientCapabilities.unions = true;
|
|
252
|
+
} else if (parsedCap.name === 'formats') {
|
|
253
|
+
clientCapabilities.formats = true;
|
|
254
|
+
} else if (parsedCap.name === 'tool-name-length') {
|
|
255
|
+
clientCapabilities.toolNameLength = parsedCap.value;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Handle no-capability options to unset capabilities
|
|
261
|
+
if (Array.isArray(argv.noCapability)) {
|
|
262
|
+
for (const cap of argv.noCapability) {
|
|
263
|
+
if (cap === 'top-level-unions') {
|
|
264
|
+
clientCapabilities.topLevelUnions = false;
|
|
265
|
+
} else if (cap === 'valid-json') {
|
|
266
|
+
clientCapabilities.validJson = false;
|
|
267
|
+
} else if (cap === 'refs') {
|
|
268
|
+
clientCapabilities.refs = false;
|
|
269
|
+
} else if (cap === 'unions') {
|
|
270
|
+
clientCapabilities.unions = false;
|
|
271
|
+
} else if (cap === 'formats') {
|
|
272
|
+
clientCapabilities.formats = false;
|
|
273
|
+
} else if (cap === 'tool-name-length') {
|
|
274
|
+
clientCapabilities.toolNameLength = undefined;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const explicitTools = Boolean(argv.tools || argv.noTools);
|
|
280
|
+
const includeDynamicTools =
|
|
281
|
+
explicitTools ? argv.tools?.includes('dynamic') && !argv.noTools?.includes('dynamic') : undefined;
|
|
282
|
+
const includeAllTools =
|
|
283
|
+
explicitTools ? argv.tools?.includes('all') && !argv.noTools?.includes('all') : undefined;
|
|
284
|
+
|
|
285
|
+
return {
|
|
286
|
+
includeDynamicTools,
|
|
287
|
+
includeAllTools,
|
|
288
|
+
filters,
|
|
289
|
+
capabilities: clientCapabilities,
|
|
290
|
+
list: argv.list || false,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function getCapabilitiesExplanation(): string {
|
|
295
|
+
return `
|
|
296
|
+
Client Capabilities Explanation:
|
|
297
|
+
|
|
298
|
+
Different Language Models (LLMs) and the MCP clients that use them have varying limitations in how they handle tool schemas. Capability flags allow you to inform the MCP server about these limitations.
|
|
299
|
+
|
|
300
|
+
When a capability flag is set to false, the MCP server will automatically adjust the tool schemas to work around that limitation, ensuring broader compatibility.
|
|
301
|
+
|
|
302
|
+
Available Capabilities:
|
|
303
|
+
|
|
304
|
+
# top-level-unions
|
|
305
|
+
Some clients/LLMs do not support JSON schemas with a union type (anyOf) at the root level. If a client lacks this capability, the MCP server splits tools with top-level unions into multiple separate tools, one for each variant in the union.
|
|
306
|
+
|
|
307
|
+
# refs
|
|
308
|
+
Some clients/LLMs do not support $ref pointers for schema reuse. If a client lacks this capability, the MCP server automatically inlines all references ($defs) directly into the schema. Properties that would cause circular references are removed during this process.
|
|
309
|
+
|
|
310
|
+
# valid-json
|
|
311
|
+
Some clients/LLMs may incorrectly send arguments as a JSON-encoded string instead of a proper JSON object. If a client *has* this capability, the MCP server will attempt to parse string values as JSON if the initial validation against the schema fails.
|
|
312
|
+
|
|
313
|
+
# unions
|
|
314
|
+
Some clients/LLMs do not support union types (anyOf) in JSON schemas. If a client lacks this capability, the MCP server removes all anyOf fields and uses only the first variant as the schema.
|
|
315
|
+
|
|
316
|
+
# formats
|
|
317
|
+
Some clients/LLMs do not support the 'format' keyword in JSON Schema specifications. If a client lacks this capability, the MCP server removes all format fields and appends the format information to the field's description in parentheses.
|
|
318
|
+
|
|
319
|
+
# tool-name-length=N
|
|
320
|
+
Some clients/LLMs impose a maximum length on tool names. If this capability is set, the MCP server will automatically truncate tool names exceeding the specified length (N), ensuring uniqueness by appending numbers if necessary.
|
|
321
|
+
|
|
322
|
+
Client Presets (--client):
|
|
323
|
+
Presets like '--client=openai-agents' or '--client=cursor' automatically configure these capabilities based on current known limitations of those clients, simplifying setup.
|
|
324
|
+
|
|
325
|
+
Current presets:
|
|
326
|
+
${JSON.stringify(CLIENT_PRESETS, null, 2)}
|
|
327
|
+
`;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function examples(): [string, string][] {
|
|
331
|
+
const firstEndpoint = endpoints[0]!;
|
|
332
|
+
const secondEndpoint =
|
|
333
|
+
endpoints.find((e) => e.metadata.resource !== firstEndpoint.metadata.resource) || endpoints[1];
|
|
334
|
+
const tag = endpoints.find((e) => e.metadata.tags.length > 0)?.metadata.tags[0];
|
|
335
|
+
const otherEndpoint = secondEndpoint || firstEndpoint;
|
|
336
|
+
|
|
337
|
+
return [
|
|
338
|
+
[
|
|
339
|
+
`--tool="${firstEndpoint.tool.name}" ${secondEndpoint ? `--tool="${secondEndpoint.tool.name}"` : ''}`,
|
|
340
|
+
'Include tools by name',
|
|
341
|
+
],
|
|
342
|
+
[
|
|
343
|
+
`--resource="${firstEndpoint.metadata.resource}" --operation="read"`,
|
|
344
|
+
'Filter by resource and operation',
|
|
345
|
+
],
|
|
346
|
+
[
|
|
347
|
+
`--resource="${otherEndpoint.metadata.resource}*" --no-tool="${otherEndpoint.tool.name}"`,
|
|
348
|
+
'Use resource wildcards and exclusions',
|
|
349
|
+
],
|
|
350
|
+
[`--client="cursor"`, 'Adjust schemas to be more compatible with Cursor'],
|
|
351
|
+
[
|
|
352
|
+
`--capability="top-level-unions" --capability="tool-name-length=40"`,
|
|
353
|
+
'Specify individual client capabilities',
|
|
354
|
+
],
|
|
355
|
+
[
|
|
356
|
+
`--client="cursor" --no-capability="tool-name-length"`,
|
|
357
|
+
'Use cursor client preset but remove tool name length limit',
|
|
358
|
+
],
|
|
359
|
+
...(tag ? [[`--tag="${tag}"`, 'Filter based on tags'] as [string, string]] : []),
|
|
360
|
+
];
|
|
361
|
+
}
|
package/src/server.ts
CHANGED
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
import { endpoints, HandlerFunction } from './tools';
|
|
5
|
+
import { Endpoint, endpoints, HandlerFunction, query } from './tools';
|
|
6
6
|
import { CallToolRequestSchema, ListToolsRequestSchema, Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
7
|
import Finch from '@tryfinch/finch-api';
|
|
8
|
+
import {
|
|
9
|
+
applyCompatibilityTransformations,
|
|
10
|
+
ClientCapabilities,
|
|
11
|
+
defaultClientCapabilities,
|
|
12
|
+
parseEmbeddedJSON,
|
|
13
|
+
} from './compat';
|
|
14
|
+
import { dynamicTools } from './dynamic-tools';
|
|
15
|
+
import { ParsedOptions } from './options';
|
|
8
16
|
export { endpoints } from './tools';
|
|
9
17
|
|
|
10
18
|
// Create server instance
|
|
11
19
|
export const server = new McpServer(
|
|
12
20
|
{
|
|
13
21
|
name: 'tryfinch_finch_api_api',
|
|
14
|
-
version: '6.
|
|
22
|
+
version: '6.29.0',
|
|
15
23
|
},
|
|
16
24
|
{
|
|
17
25
|
capabilities: {
|
|
@@ -28,42 +36,69 @@ export function init(params: {
|
|
|
28
36
|
server: Server | McpServer;
|
|
29
37
|
client?: Finch;
|
|
30
38
|
endpoints?: { tool: Tool; handler: HandlerFunction }[];
|
|
39
|
+
capabilities?: Partial<ClientCapabilities>;
|
|
31
40
|
}) {
|
|
32
41
|
const server = params.server instanceof McpServer ? params.server.server : params.server;
|
|
33
42
|
const providedEndpoints = params.endpoints || endpoints;
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint.handler]),
|
|
37
|
-
);
|
|
43
|
+
|
|
44
|
+
const endpointMap = Object.fromEntries(providedEndpoints.map((endpoint) => [endpoint.tool.name, endpoint]));
|
|
38
45
|
|
|
39
46
|
const client = params.client || new Finch({ accessToken: readEnv('FINCH_ACCESS_TOKEN') });
|
|
40
47
|
|
|
41
48
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
42
49
|
return {
|
|
43
|
-
tools,
|
|
50
|
+
tools: providedEndpoints.map((endpoint) => endpoint.tool),
|
|
44
51
|
};
|
|
45
52
|
});
|
|
46
53
|
|
|
47
54
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
48
55
|
const { name, arguments: args } = request.params;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (!handler) {
|
|
56
|
+
const endpoint = endpointMap[name];
|
|
57
|
+
if (!endpoint) {
|
|
52
58
|
throw new Error(`Unknown tool: ${name}`);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
return executeHandler(handler, client, args);
|
|
61
|
+
return executeHandler(endpoint.tool, endpoint.handler, client, args, params.capabilities);
|
|
56
62
|
});
|
|
57
63
|
}
|
|
58
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Selects the tools to include in the MCP Server based on the provided options.
|
|
67
|
+
*/
|
|
68
|
+
export function selectTools(endpoints: Endpoint[], options: ParsedOptions) {
|
|
69
|
+
const filteredEndpoints = query(options.filters, endpoints);
|
|
70
|
+
|
|
71
|
+
const includedTools = filteredEndpoints;
|
|
72
|
+
|
|
73
|
+
if (options.includeAllTools && includedTools.length === 0) {
|
|
74
|
+
includedTools.push(...endpoints);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (options.includeDynamicTools) {
|
|
78
|
+
includedTools.push(...dynamicTools(endpoints));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (includedTools.length === 0) {
|
|
82
|
+
includedTools.push(...endpoints);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return applyCompatibilityTransformations(includedTools, options.capabilities);
|
|
86
|
+
}
|
|
87
|
+
|
|
59
88
|
/**
|
|
60
89
|
* Runs the provided handler with the given client and arguments.
|
|
61
90
|
*/
|
|
62
91
|
export async function executeHandler(
|
|
92
|
+
tool: Tool,
|
|
63
93
|
handler: HandlerFunction,
|
|
64
94
|
client: Finch,
|
|
65
95
|
args: Record<string, unknown> | undefined,
|
|
96
|
+
compatibilityOptions?: Partial<ClientCapabilities>,
|
|
66
97
|
) {
|
|
98
|
+
const options = { ...defaultClientCapabilities, ...compatibilityOptions };
|
|
99
|
+
if (options.validJson && args) {
|
|
100
|
+
args = args = parseEmbeddedJSON(args, tool.inputSchema);
|
|
101
|
+
}
|
|
67
102
|
const result = await handler(client, args || {});
|
|
68
103
|
return {
|
|
69
104
|
content: [
|
|
@@ -32,8 +32,8 @@ export const tool: Tool = {
|
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export const handler = (client: Finch, args:
|
|
36
|
-
const
|
|
35
|
+
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
36
|
+
const body = args as any;
|
|
37
37
|
return client.accessTokens.create(body);
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -19,8 +19,7 @@ export const tool: Tool = {
|
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export const handler = (client: Finch, args:
|
|
23
|
-
const {} = args;
|
|
22
|
+
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
24
23
|
return client.account.disconnect();
|
|
25
24
|
};
|
|
26
25
|
|