@tryfinch/finch-api-mcp 6.31.0 → 7.0.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 +85 -10
- package/code-tool-types.d.mts +16 -0
- package/code-tool-types.d.mts.map +1 -0
- package/code-tool-types.d.ts +16 -0
- package/code-tool-types.d.ts.map +1 -0
- package/code-tool-types.js +4 -0
- package/code-tool-types.js.map +1 -0
- package/code-tool-types.mjs +3 -0
- package/code-tool-types.mjs.map +1 -0
- package/code-tool.d.mts +54 -0
- package/code-tool.d.mts.map +1 -0
- package/code-tool.d.ts +54 -0
- package/code-tool.d.ts.map +1 -0
- package/code-tool.js +54 -0
- package/code-tool.js.map +1 -0
- package/code-tool.mjs +51 -0
- package/code-tool.mjs.map +1 -0
- package/compat.d.mts +6 -0
- package/compat.d.mts.map +1 -1
- package/compat.d.ts +6 -0
- package/compat.d.ts.map +1 -1
- package/compat.js +52 -7
- package/compat.js.map +1 -1
- package/compat.mjs +52 -6
- package/compat.mjs.map +1 -1
- package/docs-search-tool.d.mts +50 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +50 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +51 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +47 -0
- package/docs-search-tool.mjs.map +1 -0
- package/dynamic-tools.d.mts +2 -2
- package/dynamic-tools.d.mts.map +1 -1
- package/dynamic-tools.d.ts +2 -2
- package/dynamic-tools.d.ts.map +1 -1
- package/dynamic-tools.js +11 -9
- package/dynamic-tools.js.map +1 -1
- package/dynamic-tools.mjs +11 -9
- package/dynamic-tools.mjs.map +1 -1
- package/filtering.d.mts +3 -0
- package/filtering.d.mts.map +1 -0
- package/filtering.d.ts +3 -0
- package/filtering.d.ts.map +1 -0
- package/filtering.js +24 -0
- package/filtering.js.map +1 -0
- package/filtering.mjs +16 -0
- package/filtering.mjs.map +1 -0
- package/headers.d.mts +4 -0
- package/headers.d.mts.map +1 -0
- package/headers.d.ts +4 -0
- package/headers.d.ts.map +1 -0
- package/headers.js +31 -0
- package/headers.js.map +1 -0
- package/headers.mjs +27 -0
- package/headers.mjs.map +1 -0
- package/http.d.mts +9 -0
- package/http.d.mts.map +1 -0
- package/http.d.ts +9 -0
- package/http.d.ts.map +1 -0
- package/http.js +108 -0
- package/http.js.map +1 -0
- package/http.mjs +100 -0
- package/http.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +15 -10
- package/index.js.map +1 -1
- package/index.mjs +18 -12
- package/index.mjs.map +1 -1
- package/options.d.mts +17 -8
- package/options.d.mts.map +1 -1
- package/options.d.ts +17 -8
- package/options.d.ts.map +1 -1
- package/options.js +151 -61
- package/options.js.map +1 -1
- package/options.mjs +149 -60
- package/options.mjs.map +1 -1
- package/package.json +161 -12
- package/server.d.mts +12 -15
- package/server.d.mts.map +1 -1
- package/server.d.ts +12 -15
- package/server.d.ts.map +1 -1
- package/server.js +107 -36
- package/server.js.map +1 -1
- package/server.mjs +105 -36
- package/server.mjs.map +1 -1
- package/src/code-tool-types.ts +18 -0
- package/src/code-tool.ts +64 -0
- package/src/compat.ts +60 -6
- package/src/docs-search-tool.ts +59 -0
- package/src/dynamic-tools.ts +13 -12
- package/src/filtering.ts +18 -0
- package/src/headers.ts +35 -0
- package/src/http.ts +127 -0
- package/src/index.ts +20 -14
- package/src/options.ts +185 -73
- package/src/server.ts +128 -48
- package/src/stdio.ts +13 -0
- package/src/tools/access-tokens/create-access-tokens.ts +30 -5
- package/src/tools/account/disconnect-account.ts +28 -5
- package/src/tools/account/introspect-account.ts +30 -5
- package/src/tools/connect/sessions/new-connect-sessions.ts +46 -14
- package/src/tools/connect/sessions/reauthenticate-connect-sessions.ts +32 -9
- package/src/tools/hris/benefits/create-hris-benefits.ts +45 -18
- package/src/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.ts +55 -10
- package/src/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.ts +37 -5
- package/src/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.ts +36 -5
- package/src/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.ts +37 -5
- package/src/tools/hris/benefits/list-hris-benefits.ts +38 -5
- package/src/tools/hris/benefits/list-supported-benefits-hris-benefits.ts +38 -5
- package/src/tools/hris/benefits/retrieve-hris-benefits.ts +37 -5
- package/src/tools/hris/benefits/update-hris-benefits.ts +35 -5
- package/src/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.ts +35 -5
- package/src/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.ts +35 -7
- package/src/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.ts +36 -5
- package/src/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.ts +37 -5
- package/src/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.ts +37 -5
- package/src/tools/hris/company/retrieve-hris-company.ts +37 -5
- package/src/tools/hris/directory/list-hris-directory.ts +36 -5
- package/src/tools/hris/documents/list-hris-documents.ts +34 -5
- package/src/tools/hris/documents/retreive-hris-documents.ts +36 -5
- package/src/tools/hris/employments/retrieve-many-hris-employments.ts +24 -3
- package/src/tools/hris/individuals/retrieve-many-hris-individuals.ts +34 -7
- package/src/tools/hris/pay-statements/retrieve-many-hris-pay-statements.ts +24 -3
- package/src/tools/hris/payments/list-hris-payments.ts +36 -5
- package/src/tools/index.ts +6 -20
- package/src/tools/jobs/automated/create-jobs-automated.ts +28 -5
- package/src/tools/jobs/automated/list-jobs-automated.ts +27 -5
- package/src/tools/jobs/automated/retrieve-jobs-automated.ts +28 -5
- package/src/tools/jobs/manual/retrieve-jobs-manual.ts +27 -5
- package/src/tools/payroll/pay-groups/list-payroll-pay-groups.ts +36 -5
- package/src/tools/payroll/pay-groups/retrieve-payroll-pay-groups.ts +37 -5
- package/src/tools/providers/list-providers.ts +31 -5
- package/src/tools/request-forwarding/forward-request-forwarding.ts +31 -9
- package/src/tools/sandbox/company/update-sandbox-company.ts +37 -9
- package/src/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.ts +28 -5
- package/src/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.ts +29 -6
- package/src/tools/sandbox/connections/create-sandbox-connections.ts +26 -5
- package/src/tools/sandbox/directory/create-sandbox-directory.ts +28 -12
- package/src/tools/sandbox/employment/update-sandbox-employment.ts +20 -7
- package/src/tools/sandbox/individual/update-sandbox-individual.ts +30 -7
- package/src/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.ts +32 -5
- package/src/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.ts +30 -5
- package/src/tools/sandbox/jobs/create-sandbox-jobs.ts +26 -5
- package/src/tools/sandbox/payment/create-sandbox-payment.ts +89 -173
- package/src/tools/types.ts +115 -0
- package/stdio.d.mts +3 -0
- package/stdio.d.mts.map +1 -0
- package/stdio.d.ts +3 -0
- package/stdio.d.ts.map +1 -0
- package/stdio.js +14 -0
- package/stdio.js.map +1 -0
- package/stdio.mjs +10 -0
- package/stdio.mjs.map +1 -0
- package/tools/access-tokens/create-access-tokens.d.mts +26 -7
- package/tools/access-tokens/create-access-tokens.d.mts.map +1 -1
- package/tools/access-tokens/create-access-tokens.d.ts +26 -7
- package/tools/access-tokens/create-access-tokens.d.ts.map +1 -1
- package/tools/access-tokens/create-access-tokens.js +32 -4
- package/tools/access-tokens/create-access-tokens.js.map +1 -1
- package/tools/access-tokens/create-access-tokens.mjs +29 -4
- package/tools/access-tokens/create-access-tokens.mjs.map +1 -1
- package/tools/account/disconnect-account.d.mts +26 -7
- package/tools/account/disconnect-account.d.mts.map +1 -1
- package/tools/account/disconnect-account.d.ts +26 -7
- package/tools/account/disconnect-account.d.ts.map +1 -1
- package/tools/account/disconnect-account.js +30 -4
- package/tools/account/disconnect-account.js.map +1 -1
- package/tools/account/disconnect-account.mjs +27 -4
- package/tools/account/disconnect-account.mjs.map +1 -1
- package/tools/account/introspect-account.d.mts +26 -7
- package/tools/account/introspect-account.d.mts.map +1 -1
- package/tools/account/introspect-account.d.ts +26 -7
- package/tools/account/introspect-account.d.ts.map +1 -1
- package/tools/account/introspect-account.js +32 -4
- package/tools/account/introspect-account.js.map +1 -1
- package/tools/account/introspect-account.mjs +29 -4
- package/tools/account/introspect-account.mjs.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.d.mts +26 -7
- package/tools/connect/sessions/new-connect-sessions.d.mts.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.d.ts +26 -7
- package/tools/connect/sessions/new-connect-sessions.d.ts.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.js +47 -13
- package/tools/connect/sessions/new-connect-sessions.js.map +1 -1
- package/tools/connect/sessions/new-connect-sessions.mjs +44 -13
- package/tools/connect/sessions/new-connect-sessions.mjs.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts +26 -7
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts +26 -7
- package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.js +32 -8
- package/tools/connect/sessions/reauthenticate-connect-sessions.js.map +1 -1
- package/tools/connect/sessions/reauthenticate-connect-sessions.mjs +29 -8
- package/tools/connect/sessions/reauthenticate-connect-sessions.mjs.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.d.mts +26 -7
- package/tools/hris/benefits/create-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.d.ts +26 -7
- package/tools/hris/benefits/create-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.js +48 -17
- package/tools/hris/benefits/create-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/create-hris-benefits.mjs +45 -17
- package/tools/hris/benefits/create-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts +26 -7
- 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 +26 -7
- 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 +54 -9
- 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 +51 -9
- 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 +26 -7
- 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 +26 -7
- 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 +37 -4
- 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 +34 -4
- 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 +26 -7
- 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 +26 -7
- 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 +38 -4
- 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 +35 -4
- 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 +26 -7
- 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 +26 -7
- 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 +37 -4
- 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 +34 -4
- package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.d.mts +26 -7
- package/tools/hris/benefits/list-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.d.ts +26 -7
- package/tools/hris/benefits/list-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.js +40 -4
- package/tools/hris/benefits/list-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/list-hris-benefits.mjs +37 -4
- package/tools/hris/benefits/list-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts +26 -7
- 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 +26 -7
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.js +40 -4
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs +37 -4
- package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.d.mts +26 -7
- package/tools/hris/benefits/retrieve-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.d.ts +26 -7
- package/tools/hris/benefits/retrieve-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.js +37 -4
- package/tools/hris/benefits/retrieve-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/retrieve-hris-benefits.mjs +34 -4
- package/tools/hris/benefits/retrieve-hris-benefits.mjs.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.d.mts +26 -7
- package/tools/hris/benefits/update-hris-benefits.d.mts.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.d.ts +26 -7
- package/tools/hris/benefits/update-hris-benefits.d.ts.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.js +35 -4
- package/tools/hris/benefits/update-hris-benefits.js.map +1 -1
- package/tools/hris/benefits/update-hris-benefits.mjs +32 -4
- 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 +26 -7
- 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 +26 -7
- 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 +38 -4
- 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 +35 -4
- 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 +26 -7
- 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 +26 -7
- 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 +36 -6
- 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 +33 -6
- 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 +26 -7
- 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 +26 -7
- 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 +37 -4
- 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 +34 -4
- 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 +26 -7
- 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 +26 -7
- 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 +40 -4
- 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 +37 -4
- 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 +26 -7
- 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 +26 -7
- 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 +38 -4
- 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 +35 -4
- 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 +26 -7
- package/tools/hris/company/retrieve-hris-company.d.mts.map +1 -1
- package/tools/hris/company/retrieve-hris-company.d.ts +26 -7
- package/tools/hris/company/retrieve-hris-company.d.ts.map +1 -1
- package/tools/hris/company/retrieve-hris-company.js +39 -4
- package/tools/hris/company/retrieve-hris-company.js.map +1 -1
- package/tools/hris/company/retrieve-hris-company.mjs +36 -4
- package/tools/hris/company/retrieve-hris-company.mjs.map +1 -1
- package/tools/hris/directory/list-hris-directory.d.mts +26 -7
- package/tools/hris/directory/list-hris-directory.d.mts.map +1 -1
- package/tools/hris/directory/list-hris-directory.d.ts +26 -7
- package/tools/hris/directory/list-hris-directory.d.ts.map +1 -1
- package/tools/hris/directory/list-hris-directory.js +38 -4
- package/tools/hris/directory/list-hris-directory.js.map +1 -1
- package/tools/hris/directory/list-hris-directory.mjs +35 -4
- package/tools/hris/directory/list-hris-directory.mjs.map +1 -1
- package/tools/hris/documents/list-hris-documents.d.mts +26 -7
- package/tools/hris/documents/list-hris-documents.d.mts.map +1 -1
- package/tools/hris/documents/list-hris-documents.d.ts +26 -7
- package/tools/hris/documents/list-hris-documents.d.ts.map +1 -1
- package/tools/hris/documents/list-hris-documents.js +37 -4
- package/tools/hris/documents/list-hris-documents.js.map +1 -1
- package/tools/hris/documents/list-hris-documents.mjs +34 -4
- package/tools/hris/documents/list-hris-documents.mjs.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.d.mts +26 -7
- package/tools/hris/documents/retreive-hris-documents.d.mts.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.d.ts +26 -7
- package/tools/hris/documents/retreive-hris-documents.d.ts.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.js +37 -4
- package/tools/hris/documents/retreive-hris-documents.js.map +1 -1
- package/tools/hris/documents/retreive-hris-documents.mjs +34 -4
- package/tools/hris/documents/retreive-hris-documents.mjs.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.d.mts +26 -7
- package/tools/hris/employments/retrieve-many-hris-employments.d.mts.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.d.ts +26 -7
- package/tools/hris/employments/retrieve-many-hris-employments.d.ts.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.js +28 -2
- package/tools/hris/employments/retrieve-many-hris-employments.js.map +1 -1
- package/tools/hris/employments/retrieve-many-hris-employments.mjs +25 -2
- package/tools/hris/employments/retrieve-many-hris-employments.mjs.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts +26 -7
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts +26 -7
- package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.js +36 -6
- package/tools/hris/individuals/retrieve-many-hris-individuals.js.map +1 -1
- package/tools/hris/individuals/retrieve-many-hris-individuals.mjs +33 -6
- package/tools/hris/individuals/retrieve-many-hris-individuals.mjs.map +1 -1
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts +26 -7
- 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 +26 -7
- 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 +28 -2
- 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 +25 -2
- package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs.map +1 -1
- package/tools/hris/payments/list-hris-payments.d.mts +26 -7
- package/tools/hris/payments/list-hris-payments.d.mts.map +1 -1
- package/tools/hris/payments/list-hris-payments.d.ts +26 -7
- package/tools/hris/payments/list-hris-payments.d.ts.map +1 -1
- package/tools/hris/payments/list-hris-payments.js +38 -4
- package/tools/hris/payments/list-hris-payments.js.map +1 -1
- package/tools/hris/payments/list-hris-payments.mjs +35 -4
- package/tools/hris/payments/list-hris-payments.mjs.map +1 -1
- package/tools/index.d.mts +2 -13
- package/tools/index.d.mts.map +1 -1
- package/tools/index.d.ts +2 -13
- package/tools/index.d.ts.map +1 -1
- package/tools/index.js +3 -4
- package/tools/index.js.map +1 -1
- package/tools/index.mjs +3 -4
- package/tools/index.mjs.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.d.mts +26 -7
- package/tools/jobs/automated/create-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.d.ts +26 -7
- package/tools/jobs/automated/create-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.js +31 -4
- package/tools/jobs/automated/create-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/create-jobs-automated.mjs +28 -4
- package/tools/jobs/automated/create-jobs-automated.mjs.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.d.mts +26 -7
- package/tools/jobs/automated/list-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.d.ts +26 -7
- package/tools/jobs/automated/list-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.js +30 -4
- package/tools/jobs/automated/list-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/list-jobs-automated.mjs +27 -4
- package/tools/jobs/automated/list-jobs-automated.mjs.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.d.mts +26 -7
- package/tools/jobs/automated/retrieve-jobs-automated.d.mts.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.d.ts +26 -7
- package/tools/jobs/automated/retrieve-jobs-automated.d.ts.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.js +30 -4
- package/tools/jobs/automated/retrieve-jobs-automated.js.map +1 -1
- package/tools/jobs/automated/retrieve-jobs-automated.mjs +27 -4
- package/tools/jobs/automated/retrieve-jobs-automated.mjs.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.d.mts +26 -7
- package/tools/jobs/manual/retrieve-jobs-manual.d.mts.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.d.ts +26 -7
- package/tools/jobs/manual/retrieve-jobs-manual.d.ts.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.js +30 -4
- package/tools/jobs/manual/retrieve-jobs-manual.js.map +1 -1
- package/tools/jobs/manual/retrieve-jobs-manual.mjs +27 -4
- package/tools/jobs/manual/retrieve-jobs-manual.mjs.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts +26 -7
- 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 +26 -7
- package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.js +38 -4
- package/tools/payroll/pay-groups/list-payroll-pay-groups.js.map +1 -1
- package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs +35 -4
- package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts +26 -7
- 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 +26 -7
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js +37 -4
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js.map +1 -1
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs +34 -4
- package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs.map +1 -1
- package/tools/providers/list-providers.d.mts +26 -7
- package/tools/providers/list-providers.d.mts.map +1 -1
- package/tools/providers/list-providers.d.ts +26 -7
- package/tools/providers/list-providers.d.ts.map +1 -1
- package/tools/providers/list-providers.js +33 -4
- package/tools/providers/list-providers.js.map +1 -1
- package/tools/providers/list-providers.mjs +30 -4
- package/tools/providers/list-providers.mjs.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.d.mts +26 -7
- package/tools/request-forwarding/forward-request-forwarding.d.mts.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.d.ts +26 -7
- package/tools/request-forwarding/forward-request-forwarding.d.ts.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.js +34 -8
- package/tools/request-forwarding/forward-request-forwarding.js.map +1 -1
- package/tools/request-forwarding/forward-request-forwarding.mjs +31 -8
- package/tools/request-forwarding/forward-request-forwarding.mjs.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.d.mts +26 -7
- package/tools/sandbox/company/update-sandbox-company.d.mts.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.d.ts +26 -7
- package/tools/sandbox/company/update-sandbox-company.d.ts.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.js +39 -8
- package/tools/sandbox/company/update-sandbox-company.js.map +1 -1
- package/tools/sandbox/company/update-sandbox-company.mjs +36 -8
- package/tools/sandbox/company/update-sandbox-company.mjs.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts +26 -7
- 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 +26 -7
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js +28 -4
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js.map +1 -1
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs +25 -4
- package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts +26 -7
- 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 +26 -7
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js +30 -5
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js.map +1 -1
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs +27 -5
- package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.d.mts +26 -7
- package/tools/sandbox/connections/create-sandbox-connections.d.mts.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.d.ts +26 -7
- package/tools/sandbox/connections/create-sandbox-connections.d.ts.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.js +28 -4
- package/tools/sandbox/connections/create-sandbox-connections.js.map +1 -1
- package/tools/sandbox/connections/create-sandbox-connections.mjs +25 -4
- package/tools/sandbox/connections/create-sandbox-connections.mjs.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.d.mts +26 -7
- package/tools/sandbox/directory/create-sandbox-directory.d.mts.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.d.ts +26 -7
- package/tools/sandbox/directory/create-sandbox-directory.d.ts.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.js +30 -11
- package/tools/sandbox/directory/create-sandbox-directory.js.map +1 -1
- package/tools/sandbox/directory/create-sandbox-directory.mjs +27 -11
- package/tools/sandbox/directory/create-sandbox-directory.mjs.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.d.mts +26 -7
- package/tools/sandbox/employment/update-sandbox-employment.d.mts.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.d.ts +26 -7
- package/tools/sandbox/employment/update-sandbox-employment.d.ts.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.js +24 -6
- package/tools/sandbox/employment/update-sandbox-employment.js.map +1 -1
- package/tools/sandbox/employment/update-sandbox-employment.mjs +21 -6
- package/tools/sandbox/employment/update-sandbox-employment.mjs.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.d.mts +26 -7
- package/tools/sandbox/individual/update-sandbox-individual.d.mts.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.d.ts +26 -7
- package/tools/sandbox/individual/update-sandbox-individual.d.ts.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.js +30 -6
- package/tools/sandbox/individual/update-sandbox-individual.js.map +1 -1
- package/tools/sandbox/individual/update-sandbox-individual.mjs +27 -6
- package/tools/sandbox/individual/update-sandbox-individual.mjs.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts +26 -7
- 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 +26 -7
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js +32 -4
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js.map +1 -1
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs +29 -4
- package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts +26 -7
- 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 +26 -7
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js +30 -4
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js.map +1 -1
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs +27 -4
- package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.d.mts +26 -7
- package/tools/sandbox/jobs/create-sandbox-jobs.d.mts.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.d.ts +26 -7
- package/tools/sandbox/jobs/create-sandbox-jobs.d.ts.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.js +28 -4
- package/tools/sandbox/jobs/create-sandbox-jobs.js.map +1 -1
- package/tools/sandbox/jobs/create-sandbox-jobs.mjs +25 -4
- package/tools/sandbox/jobs/create-sandbox-jobs.mjs.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.d.mts +26 -7
- package/tools/sandbox/payment/create-sandbox-payment.d.mts.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.d.ts +26 -7
- package/tools/sandbox/payment/create-sandbox-payment.d.ts.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.js +91 -167
- package/tools/sandbox/payment/create-sandbox-payment.js.map +1 -1
- package/tools/sandbox/payment/create-sandbox-payment.mjs +88 -167
- package/tools/sandbox/payment/create-sandbox-payment.mjs.map +1 -1
- package/tools/types.d.mts +52 -0
- package/tools/types.d.mts.map +1 -0
- package/tools/types.d.ts +52 -0
- package/tools/types.d.ts.map +1 -0
- package/tools/types.js +58 -0
- package/tools/types.js.map +1 -0
- package/tools/types.mjs +53 -0
- package/tools/types.mjs.map +1 -0
- package/src/tools/hris/directory/list-individuals-hris-directory.ts +0 -36
- package/tools/hris/directory/list-individuals-hris-directory.d.mts +0 -32
- package/tools/hris/directory/list-individuals-hris-directory.d.mts.map +0 -1
- package/tools/hris/directory/list-individuals-hris-directory.d.ts +0 -32
- package/tools/hris/directory/list-individuals-hris-directory.d.ts.map +0 -1
- package/tools/hris/directory/list-individuals-hris-directory.js +0 -33
- package/tools/hris/directory/list-individuals-hris-directory.js.map +0 -1
- package/tools/hris/directory/list-individuals-hris-directory.mjs +0 -29
- package/tools/hris/directory/list-individuals-hris-directory.mjs.map +0 -1
|
@@ -1,32 +1,63 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.company.pay_statement_item.rules',
|
|
9
11
|
operation: 'write',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'delete',
|
|
14
|
+
httpPath: '/employer/pay-statement-item/rule/{rule_id}',
|
|
15
|
+
operationId: 'delete-rule',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'delete_pay_statement_item_company_hris_rules',
|
|
15
20
|
description:
|
|
16
|
-
'**Beta:** this endpoint currently serves employers onboarded after March 4th and historical support will be added soon\nDelete a rule for a pay statement item.\n',
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n**Beta:** this endpoint currently serves employers onboarded after March 4th and historical support will be added soon\nDelete a rule for a pay statement item.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/rule_delete_response',\n $defs: {\n rule_delete_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'Finch id (uuidv4) for the rule.'\n },\n attributes: {\n type: 'object',\n description: 'Specifies the fields to be applied when the condition is met.',\n properties: {\n metadata: {\n type: 'object',\n description: 'The metadata to be attached in the entity. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).',\n additionalProperties: true\n }\n }\n },\n conditions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n field: {\n type: 'string',\n description: 'The field to be checked in the rule.'\n },\n operator: {\n type: 'string',\n description: 'The operator to be used in the rule.',\n enum: [ 'equals'\n ]\n },\n value: {\n type: 'string',\n description: 'The value of the field to be checked in the rule.'\n }\n }\n }\n },\n created_at: {\n type: 'string',\n description: 'The datetime when the rule was created.',\n format: 'date-time'\n },\n deleted_at: {\n type: 'string',\n description: 'The datetime when the rule was deleted.',\n format: 'date-time'\n },\n effective_end_date: {\n type: 'string',\n title: 'Date',\n description: 'Specifies when the rules should stop applying rules based on the date.'\n },\n effective_start_date: {\n type: 'string',\n title: 'Date',\n description: 'Specifies when the rule should begin applying based on the date.'\n },\n entity_type: {\n type: 'string',\n description: 'The entity type to which the rule is applied.',\n enum: [ 'pay_statement_item'\n ]\n },\n priority: {\n type: 'integer',\n description: 'The priority of the rule.'\n },\n updated_at: {\n type: 'string',\n description: 'The datetime when the rule was last updated.',\n format: 'date-time'\n }\n }\n }\n }\n}\n```",
|
|
17
22
|
inputSchema: {
|
|
18
23
|
type: 'object',
|
|
19
24
|
properties: {
|
|
20
25
|
rule_id: {
|
|
21
26
|
type: 'string',
|
|
22
27
|
},
|
|
28
|
+
entity_ids: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
description: 'The entity IDs to delete the rule for.',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
jq_filter: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
title: 'jq Filter',
|
|
38
|
+
description:
|
|
39
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
40
|
+
},
|
|
23
41
|
},
|
|
42
|
+
required: ['rule_id'],
|
|
43
|
+
},
|
|
44
|
+
annotations: {
|
|
45
|
+
idempotentHint: true,
|
|
24
46
|
},
|
|
25
47
|
};
|
|
26
48
|
|
|
27
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
28
|
-
const { rule_id, ...body } = args as any;
|
|
29
|
-
|
|
49
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
50
|
+
const { rule_id, jq_filter, ...body } = args as any;
|
|
51
|
+
try {
|
|
52
|
+
return asTextContentResult(
|
|
53
|
+
await maybeFilter(jq_filter, await client.hris.company.payStatementItem.rules.delete(rule_id, body)),
|
|
54
|
+
);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
57
|
+
return asErrorResult(error.message);
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
30
61
|
};
|
|
31
62
|
|
|
32
63
|
export default { metadata, tool, handler };
|
|
@@ -1,27 +1,59 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.company.pay_statement_item.rules',
|
|
9
11
|
operation: 'read',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/employer/pay-statement-item/rule',
|
|
15
|
+
operationId: 'get-rules',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'list_pay_statement_item_company_hris_rules',
|
|
15
20
|
description:
|
|
16
|
-
'**Beta:** this endpoint currently serves employers onboarded after March 4th and historical support will be added soon\nList all rules of a connection account.\n',
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n**Beta:** this endpoint currently serves employers onboarded after March 4th and historical support will be added soon\nList all rules of a connection account.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n responses: {\n type: 'array',\n items: {\n $ref: '#/$defs/rule_list_response'\n }\n }\n },\n required: [ 'responses'\n ],\n $defs: {\n rule_list_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'Finch id (uuidv4) for the rule.'\n },\n attributes: {\n type: 'object',\n description: 'Specifies the fields to be applied when the condition is met.',\n properties: {\n metadata: {\n type: 'object',\n description: 'The metadata to be attached in the entity. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).',\n additionalProperties: true\n }\n }\n },\n conditions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n field: {\n type: 'string',\n description: 'The field to be checked in the rule.'\n },\n operator: {\n type: 'string',\n description: 'The operator to be used in the rule.',\n enum: [ 'equals'\n ]\n },\n value: {\n type: 'string',\n description: 'The value of the field to be checked in the rule.'\n }\n }\n }\n },\n created_at: {\n type: 'string',\n description: 'The datetime when the rule was created.',\n format: 'date-time'\n },\n effective_end_date: {\n type: 'string',\n title: 'Date',\n description: 'Specifies when the rules should stop applying rules based on the date.'\n },\n effective_start_date: {\n type: 'string',\n title: 'Date',\n description: 'Specifies when the rule should begin applying based on the date.'\n },\n entity_type: {\n type: 'string',\n description: 'The entity type to which the rule is applied.',\n enum: [ 'pay_statement_item'\n ]\n },\n priority: {\n type: 'integer',\n description: 'The priority of the rule.'\n },\n updated_at: {\n type: 'string',\n description: 'The datetime when the rule was last updated.',\n format: 'date-time'\n }\n }\n }\n }\n}\n```",
|
|
17
22
|
inputSchema: {
|
|
18
23
|
type: 'object',
|
|
19
|
-
properties: {
|
|
24
|
+
properties: {
|
|
25
|
+
entity_ids: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
description: 'The entity IDs to retrieve rules for.',
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
jq_filter: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
title: 'jq Filter',
|
|
35
|
+
description:
|
|
36
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
required: [],
|
|
40
|
+
},
|
|
41
|
+
annotations: {
|
|
42
|
+
readOnlyHint: true,
|
|
20
43
|
},
|
|
21
44
|
};
|
|
22
45
|
|
|
23
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
24
|
-
|
|
46
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
47
|
+
const { jq_filter, ...body } = args as any;
|
|
48
|
+
const response = await client.hris.company.payStatementItem.rules.list(body).asResponse();
|
|
49
|
+
try {
|
|
50
|
+
return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
|
|
51
|
+
} catch (error) {
|
|
52
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
53
|
+
return asErrorResult(error.message);
|
|
54
|
+
}
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
25
57
|
};
|
|
26
58
|
|
|
27
59
|
export default { metadata, tool, handler };
|
|
@@ -1,35 +1,67 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.company.pay_statement_item.rules',
|
|
9
11
|
operation: 'write',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'put',
|
|
14
|
+
httpPath: '/employer/pay-statement-item/rule/{rule_id}',
|
|
15
|
+
operationId: 'update-rule',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'update_pay_statement_item_company_hris_rules',
|
|
15
20
|
description:
|
|
16
|
-
'**Beta:** this endpoint currently serves employers onboarded after March 4th and historical support will be added soon\nUpdate a rule for a pay statement item.\n',
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n**Beta:** this endpoint currently serves employers onboarded after March 4th and historical support will be added soon\nUpdate a rule for a pay statement item.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/rule_update_response',\n $defs: {\n rule_update_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'Finch id (uuidv4) for the rule.'\n },\n attributes: {\n type: 'object',\n description: 'Specifies the fields to be applied when the condition is met.',\n properties: {\n metadata: {\n type: 'object',\n description: 'The metadata to be attached in the entity. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).',\n additionalProperties: true\n }\n }\n },\n conditions: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n field: {\n type: 'string',\n description: 'The field to be checked in the rule.'\n },\n operator: {\n type: 'string',\n description: 'The operator to be used in the rule.',\n enum: [ 'equals'\n ]\n },\n value: {\n type: 'string',\n description: 'The value of the field to be checked in the rule.'\n }\n }\n }\n },\n created_at: {\n type: 'string',\n description: 'The datetime when the rule was created.',\n format: 'date-time'\n },\n effective_end_date: {\n type: 'string',\n title: 'Date',\n description: 'Specifies when the rules should stop applying rules based on the date.'\n },\n effective_start_date: {\n type: 'string',\n title: 'Date',\n description: 'Specifies when the rule should begin applying based on the date.'\n },\n entity_type: {\n type: 'string',\n description: 'The entity type to which the rule is applied.',\n enum: [ 'pay_statement_item'\n ]\n },\n priority: {\n type: 'integer',\n description: 'The priority of the rule.'\n },\n updated_at: {\n type: 'string',\n description: 'The datetime when the rule was last updated.',\n format: 'date-time'\n }\n }\n }\n }\n}\n```",
|
|
17
22
|
inputSchema: {
|
|
18
23
|
type: 'object',
|
|
19
24
|
properties: {
|
|
20
25
|
rule_id: {
|
|
21
26
|
type: 'string',
|
|
22
27
|
},
|
|
28
|
+
entity_ids: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
description: 'The entity IDs to update the rule for.',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
23
35
|
optionalProperty: {
|
|
24
36
|
type: 'object',
|
|
37
|
+
additionalProperties: true,
|
|
38
|
+
},
|
|
39
|
+
jq_filter: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: 'jq Filter',
|
|
42
|
+
description:
|
|
43
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
25
44
|
},
|
|
26
45
|
},
|
|
46
|
+
required: ['rule_id'],
|
|
47
|
+
},
|
|
48
|
+
annotations: {
|
|
49
|
+
idempotentHint: true,
|
|
27
50
|
},
|
|
28
51
|
};
|
|
29
52
|
|
|
30
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
31
|
-
const { rule_id, ...body } = args as any;
|
|
32
|
-
|
|
53
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
54
|
+
const { rule_id, jq_filter, ...body } = args as any;
|
|
55
|
+
try {
|
|
56
|
+
return asTextContentResult(
|
|
57
|
+
await maybeFilter(jq_filter, await client.hris.company.payStatementItem.rules.update(rule_id, body)),
|
|
58
|
+
);
|
|
59
|
+
} catch (error) {
|
|
60
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
61
|
+
return asErrorResult(error.message);
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
33
65
|
};
|
|
34
66
|
|
|
35
67
|
export default { metadata, tool, handler };
|
|
@@ -1,26 +1,58 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.company',
|
|
9
11
|
operation: 'read',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/employer/company',
|
|
15
|
+
operationId: 'get-company',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'retrieve_hris_company',
|
|
15
|
-
description:
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRead basic company data\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/company',\n $defs: {\n company: {\n type: 'object',\n title: 'GetCompany',\n properties: {\n id: {\n type: 'string',\n description: 'A stable Finch `id` (UUID v4) for the company.'\n },\n accounts: {\n type: 'array',\n description: 'An array of bank account objects associated with the payroll/HRIS system.',\n items: {\n type: 'object',\n properties: {\n account_name: {\n type: 'string',\n description: 'The name of the bank associated in the payroll/HRIS system.'\n },\n account_number: {\n type: 'string',\n description: '10-12 digit number to specify the bank account'\n },\n account_type: {\n type: 'string',\n description: 'The type of bank account.',\n enum: [ 'checking',\n 'savings'\n ]\n },\n institution_name: {\n type: 'string',\n description: 'Name of the banking institution.'\n },\n routing_number: {\n type: 'string',\n description: 'A nine-digit code that\\'s based on the U.S. Bank location where your account was opened.'\n }\n },\n required: [ 'account_name',\n 'account_number',\n 'account_type',\n 'institution_name',\n 'routing_number'\n ]\n }\n },\n departments: {\n type: 'array',\n description: 'The array of company departments.',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'The department name.'\n },\n parent: {\n type: 'object',\n description: 'The parent department, if present.',\n properties: {\n name: {\n type: 'string',\n description: 'The parent department\\'s name.'\n }\n },\n required: [ 'name'\n ]\n }\n },\n required: [ 'name',\n 'parent'\n ]\n }\n },\n ein: {\n type: 'string',\n description: 'The employer identification number.'\n },\n entity: {\n type: 'object',\n description: 'The entity type object.',\n properties: {\n subtype: {\n type: 'string',\n description: 'The tax payer subtype of the company.',\n enum: [ 's_corporation',\n 'c_corporation',\n 'b_corporation'\n ]\n },\n type: {\n type: 'string',\n description: 'The tax payer type of the company.',\n enum: [ 'llc',\n 'lp',\n 'corporation',\n 'sole_proprietor',\n 'non_profit',\n 'partnership',\n 'cooperative'\n ]\n }\n },\n required: [ 'subtype',\n 'type'\n ]\n },\n legal_name: {\n type: 'string',\n description: 'The legal name of the company.'\n },\n locations: {\n type: 'array',\n items: {\n $ref: '#/$defs/location'\n }\n },\n primary_email: {\n type: 'string',\n description: 'The email of the main administrator on the account.'\n },\n primary_phone_number: {\n type: 'string',\n description: 'The phone number of the main administrator on the account. Format: E.164, with extension where applicable, e.g. `+NNNNNNNNNNN xExtension`'\n }\n },\n required: [ 'id',\n 'accounts',\n 'departments',\n 'ein',\n 'entity',\n 'legal_name',\n 'locations',\n 'primary_email',\n 'primary_phone_number'\n ]\n },\n location: {\n type: 'object',\n title: 'Location',\n properties: {\n city: {\n type: 'string',\n description: 'City, district, suburb, town, or village.'\n },\n country: {\n type: 'string',\n description: 'The 2-letter ISO 3166 country code.'\n },\n line1: {\n type: 'string',\n description: 'Street address or PO box.'\n },\n line2: {\n type: 'string',\n description: 'Apartment, suite, unit, or building.'\n },\n postal_code: {\n type: 'string',\n description: 'The postal code or zip code.'\n },\n state: {\n type: 'string',\n description: 'The state code.'\n },\n name: {\n type: 'string'\n },\n source_id: {\n type: 'string'\n }\n },\n required: [ 'city',\n 'country',\n 'line1',\n 'line2',\n 'postal_code',\n 'state'\n ]\n }\n }\n}\n```",
|
|
16
22
|
inputSchema: {
|
|
17
23
|
type: 'object',
|
|
18
|
-
properties: {
|
|
24
|
+
properties: {
|
|
25
|
+
entity_ids: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
description: "The entity IDs to specify which entities' data to access.",
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
jq_filter: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
title: 'jq Filter',
|
|
35
|
+
description:
|
|
36
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
required: [],
|
|
40
|
+
},
|
|
41
|
+
annotations: {
|
|
42
|
+
readOnlyHint: true,
|
|
19
43
|
},
|
|
20
44
|
};
|
|
21
45
|
|
|
22
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
23
|
-
|
|
46
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
47
|
+
const { jq_filter, ...body } = args as any;
|
|
48
|
+
try {
|
|
49
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.hris.company.retrieve(body)));
|
|
50
|
+
} catch (error) {
|
|
51
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
52
|
+
return asErrorResult(error.message);
|
|
53
|
+
}
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
24
56
|
};
|
|
25
57
|
|
|
26
58
|
export default { metadata, tool, handler };
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.directory',
|
|
9
11
|
operation: 'read',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/employer/directory',
|
|
15
|
+
operationId: 'get-directory',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'list_hris_directory',
|
|
15
|
-
description:
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRead company directory and organization structure\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n individuals: {\n type: 'array',\n description: 'The array of employees.',\n items: {\n $ref: '#/$defs/individual_in_directory'\n }\n },\n paging: {\n $ref: '#/$defs/paging'\n }\n },\n required: [ 'individuals',\n 'paging'\n ],\n $defs: {\n individual_in_directory: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'A stable Finch `id` (UUID v4) for an individual in the company.'\n },\n department: {\n type: 'object',\n description: 'The department object.',\n properties: {\n name: {\n type: 'string',\n description: 'The name of the department.'\n }\n }\n },\n first_name: {\n type: 'string',\n description: 'The legal first name of the individual.'\n },\n is_active: {\n type: 'boolean',\n description: '`true` if the individual is an active employee or contractor at the company.'\n },\n last_name: {\n type: 'string',\n description: 'The legal last name of the individual.'\n },\n manager: {\n type: 'object',\n description: 'The manager object.',\n properties: {\n id: {\n type: 'string',\n description: 'A stable Finch `id` (UUID v4) for an individual in the company.'\n }\n },\n required: [ 'id'\n ]\n },\n middle_name: {\n type: 'string',\n description: 'The legal middle name of the individual.'\n }\n },\n required: [ 'id',\n 'department',\n 'first_name',\n 'is_active',\n 'last_name',\n 'manager',\n 'middle_name'\n ]\n },\n paging: {\n type: 'object',\n title: 'Paging',\n properties: {\n offset: {\n type: 'integer',\n description: 'The current start index of the returned list of elements'\n },\n count: {\n type: 'integer',\n description: 'The total number of elements for the entire query (not just the given page)'\n }\n },\n required: [ 'offset'\n ]\n }\n }\n}\n```",
|
|
16
22
|
inputSchema: {
|
|
17
23
|
type: 'object',
|
|
18
24
|
properties: {
|
|
25
|
+
entity_ids: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
description: "The entity IDs to specify which entities' data to access.",
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
19
32
|
limit: {
|
|
20
33
|
type: 'integer',
|
|
21
34
|
description: 'Number of employees to return (defaults to all)',
|
|
@@ -24,13 +37,31 @@ export const tool: Tool = {
|
|
|
24
37
|
type: 'integer',
|
|
25
38
|
description: 'Index to start from (defaults to 0)',
|
|
26
39
|
},
|
|
40
|
+
jq_filter: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
title: 'jq Filter',
|
|
43
|
+
description:
|
|
44
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
45
|
+
},
|
|
27
46
|
},
|
|
47
|
+
required: [],
|
|
48
|
+
},
|
|
49
|
+
annotations: {
|
|
50
|
+
readOnlyHint: true,
|
|
28
51
|
},
|
|
29
52
|
};
|
|
30
53
|
|
|
31
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
32
|
-
const body = args as any;
|
|
33
|
-
|
|
54
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
55
|
+
const { jq_filter, ...body } = args as any;
|
|
56
|
+
const response = await client.hris.directory.list(body).asResponse();
|
|
57
|
+
try {
|
|
58
|
+
return asTextContentResult(await maybeFilter(jq_filter, await response.json()));
|
|
59
|
+
} catch (error) {
|
|
60
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
61
|
+
return asErrorResult(error.message);
|
|
62
|
+
}
|
|
63
|
+
throw error;
|
|
64
|
+
}
|
|
34
65
|
};
|
|
35
66
|
|
|
36
67
|
export default { metadata, tool, handler };
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.documents',
|
|
9
11
|
operation: 'read',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/employer/documents',
|
|
15
|
+
operationId: 'list-documents',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'list_hris_documents',
|
|
15
20
|
description:
|
|
16
|
-
'**Beta:** This endpoint is in beta and may change.\nRetrieve a list of company-wide documents.\n',
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n**Beta:** This endpoint is in beta and may change.\nRetrieve a list of company-wide documents.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/document_list_response',\n $defs: {\n document_list_response: {\n type: 'object',\n properties: {\n documents: {\n type: 'array',\n items: {\n $ref: '#/$defs/document_response'\n }\n },\n paging: {\n $ref: '#/$defs/paging'\n }\n },\n required: [ 'documents',\n 'paging'\n ]\n },\n document_response: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'A stable Finch id for the document.'\n },\n individual_id: {\n type: 'string',\n description: 'The ID of the individual associated with the document. This will be null for employer-level documents.'\n },\n type: {\n type: 'string',\n description: 'The type of document.',\n enum: [ 'w4_2020',\n 'w4_2005'\n ]\n },\n url: {\n type: 'string',\n description: 'A URL to access the document. Format: `https://api.tryfinch.com/employer/documents/:document_id`.'\n },\n year: {\n type: 'number',\n description: 'The year the document applies to, if available.'\n }\n },\n required: [ 'id',\n 'individual_id',\n 'type',\n 'url',\n 'year'\n ]\n },\n paging: {\n type: 'object',\n title: 'Paging',\n properties: {\n offset: {\n type: 'integer',\n description: 'The current start index of the returned list of elements'\n },\n count: {\n type: 'integer',\n description: 'The total number of elements for the entire query (not just the given page)'\n }\n },\n required: [ 'offset'\n ]\n }\n }\n}\n```",
|
|
17
22
|
inputSchema: {
|
|
18
23
|
type: 'object',
|
|
19
24
|
properties: {
|
|
25
|
+
entity_ids: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
description: "The entity IDs to specify which entities' data to access.",
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
20
32
|
individual_ids: {
|
|
21
33
|
type: 'array',
|
|
22
34
|
description:
|
|
@@ -41,13 +53,30 @@ export const tool: Tool = {
|
|
|
41
53
|
enum: ['w4_2020', 'w4_2005'],
|
|
42
54
|
},
|
|
43
55
|
},
|
|
56
|
+
jq_filter: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
title: 'jq Filter',
|
|
59
|
+
description:
|
|
60
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
61
|
+
},
|
|
44
62
|
},
|
|
63
|
+
required: [],
|
|
64
|
+
},
|
|
65
|
+
annotations: {
|
|
66
|
+
readOnlyHint: true,
|
|
45
67
|
},
|
|
46
68
|
};
|
|
47
69
|
|
|
48
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
49
|
-
const body = args as any;
|
|
50
|
-
|
|
70
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
71
|
+
const { jq_filter, ...body } = args as any;
|
|
72
|
+
try {
|
|
73
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.hris.documents.list(body)));
|
|
74
|
+
} catch (error) {
|
|
75
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
76
|
+
return asErrorResult(error.message);
|
|
77
|
+
}
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
51
80
|
};
|
|
52
81
|
|
|
53
82
|
export default { metadata, tool, handler };
|
|
@@ -1,32 +1,63 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
|
|
4
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
5
|
+
|
|
3
6
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../';
|
|
5
7
|
import Finch from '@tryfinch/finch-api';
|
|
6
8
|
|
|
7
9
|
export const metadata: Metadata = {
|
|
8
10
|
resource: 'hris.documents',
|
|
9
11
|
operation: 'read',
|
|
10
12
|
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/employer/documents/{document_id}',
|
|
15
|
+
operationId: 'get-document',
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export const tool: Tool = {
|
|
14
19
|
name: 'retreive_hris_documents',
|
|
15
20
|
description:
|
|
16
|
-
'**Beta:** This endpoint is in beta and may change.\nRetrieve details of a specific document by its ID.\n',
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\n**Beta:** This endpoint is in beta and may change.\nRetrieve details of a specific document by its ID.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/document_retreive_response',\n $defs: {\n document_retreive_response: {\n anyOf: [ {\n $ref: '#/$defs/w42020'\n },\n {\n $ref: '#/$defs/w42005'\n }\n ],\n description: 'A 2020 version of the W-4 tax form containing information on an individual\\'s filing status, dependents, and withholding details.'\n },\n w42020: {\n type: 'object',\n description: 'A 2020 version of the W-4 tax form containing information on an individual\\'s filing status, dependents, and withholding details.',\n properties: {\n data: {\n type: 'object',\n description: 'Detailed information specific to the 2020 W4 form.',\n properties: {\n amount_for_other_dependents: {\n type: 'integer',\n description: 'Amount claimed for dependents other than qualifying children under 17 (in cents).'\n },\n amount_for_qualifying_children_under_17: {\n type: 'integer',\n description: 'Amount claimed for dependents under 17 years old (in cents).'\n },\n deductions: {\n type: 'integer',\n description: 'Deductible expenses (in cents).'\n },\n extra_withholding: {\n type: 'integer',\n description: 'Additional withholding amount (in cents).'\n },\n filing_status: {\n type: 'string',\n description: 'The individual\\'s filing status for tax purposes.',\n enum: [ 'head_of_household',\n 'married_filing_jointly_or_qualifying_surviving_spouse',\n 'single_or_married_filing_separately'\n ]\n },\n individual_id: {\n type: 'string',\n description: 'The unique identifier for the individual associated with this document.'\n },\n other_income: {\n type: 'integer',\n description: 'Additional income from sources outside of primary employment (in cents).'\n },\n total_claim_dependent_and_other_credits: {\n type: 'integer',\n description: 'Total amount claimed for dependents and other credits (in cents).'\n }\n },\n required: [ 'amount_for_other_dependents',\n 'amount_for_qualifying_children_under_17',\n 'deductions',\n 'extra_withholding',\n 'filing_status',\n 'individual_id',\n 'other_income',\n 'total_claim_dependent_and_other_credits'\n ]\n },\n type: {\n type: 'string',\n description: 'Specifies the form type, indicating that this document is a 2020 W4 form.',\n enum: [ 'w4_2020'\n ]\n },\n year: {\n type: 'number',\n description: 'The tax year this W4 document applies to.'\n }\n },\n required: [ 'data',\n 'type',\n 'year'\n ]\n },\n w42005: {\n type: 'object',\n description: 'A 2005 version of the W-4 tax form containing information on an individual\\'s filing status, dependents, and withholding details.',\n properties: {\n data: {\n type: 'object',\n description: 'Detailed information specific to the 2005 W4 form.',\n properties: {\n additional_withholding: {\n type: 'integer',\n description: 'Additional withholding amount (in cents).'\n },\n exemption: {\n type: 'string',\n description: 'Indicates exemption status from federal tax withholding.',\n enum: [ 'exempt',\n 'non_exempt'\n ]\n },\n filing_status: {\n type: 'string',\n description: 'The individual\\'s filing status for tax purposes.',\n enum: [ 'married',\n 'married_but_withhold_at_higher_single_rate',\n 'single'\n ]\n },\n individual_id: {\n type: 'string',\n description: 'The unique identifier for the individual associated with this 2005 W4 form.'\n },\n total_number_of_allowances: {\n type: 'integer',\n description: 'Total number of allowances claimed (in cents).'\n }\n },\n required: [ 'additional_withholding',\n 'exemption',\n 'filing_status',\n 'individual_id',\n 'total_number_of_allowances'\n ]\n },\n type: {\n type: 'string',\n description: 'Specifies the form type, indicating that this document is a 2005 W4 form.',\n enum: [ 'w4_2005'\n ]\n },\n year: {\n type: 'number',\n description: 'The tax year this W4 document applies to.'\n }\n },\n required: [ 'data',\n 'type',\n 'year'\n ]\n }\n }\n}\n```",
|
|
17
22
|
inputSchema: {
|
|
18
23
|
type: 'object',
|
|
19
24
|
properties: {
|
|
20
25
|
document_id: {
|
|
21
26
|
type: 'string',
|
|
22
27
|
},
|
|
28
|
+
entity_ids: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
description: "The entity IDs to specify which entities' data to access.",
|
|
31
|
+
items: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
jq_filter: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
title: 'jq Filter',
|
|
38
|
+
description:
|
|
39
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
40
|
+
},
|
|
23
41
|
},
|
|
42
|
+
required: ['document_id'],
|
|
43
|
+
},
|
|
44
|
+
annotations: {
|
|
45
|
+
readOnlyHint: true,
|
|
24
46
|
},
|
|
25
47
|
};
|
|
26
48
|
|
|
27
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
28
|
-
const { document_id, ...body } = args as any;
|
|
29
|
-
|
|
49
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
50
|
+
const { document_id, jq_filter, ...body } = args as any;
|
|
51
|
+
try {
|
|
52
|
+
return asTextContentResult(
|
|
53
|
+
await maybeFilter(jq_filter, await client.hris.documents.retreive(document_id, body)),
|
|
54
|
+
);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (error instanceof Finch.APIError || isJqError(error)) {
|
|
57
|
+
return asErrorResult(error.message);
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
30
61
|
};
|
|
31
62
|
|
|
32
63
|
export default { metadata, tool, handler };
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
|
|
4
|
+
|
|
3
5
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
-
import type { Metadata } from '../../';
|
|
5
6
|
import Finch from '@tryfinch/finch-api';
|
|
6
7
|
|
|
7
8
|
export const metadata: Metadata = {
|
|
8
9
|
resource: 'hris.employments',
|
|
9
10
|
operation: 'write',
|
|
10
11
|
tags: [],
|
|
12
|
+
httpMethod: 'post',
|
|
13
|
+
httpPath: '/employer/employment',
|
|
14
|
+
operationId: 'get-employment',
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
export const tool: Tool = {
|
|
@@ -31,13 +35,30 @@ export const tool: Tool = {
|
|
|
31
35
|
required: ['individual_id'],
|
|
32
36
|
},
|
|
33
37
|
},
|
|
38
|
+
entity_ids: {
|
|
39
|
+
type: 'array',
|
|
40
|
+
description: "The entity IDs to specify which entities' data to access.",
|
|
41
|
+
items: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
34
45
|
},
|
|
46
|
+
required: ['requests'],
|
|
35
47
|
},
|
|
48
|
+
annotations: {},
|
|
36
49
|
};
|
|
37
50
|
|
|
38
|
-
export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
51
|
+
export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
|
|
39
52
|
const body = args as any;
|
|
40
|
-
|
|
53
|
+
const response = await client.hris.employments.retrieveMany(body).asResponse();
|
|
54
|
+
try {
|
|
55
|
+
return asTextContentResult(await response.json());
|
|
56
|
+
} catch (error) {
|
|
57
|
+
if (error instanceof Finch.APIError) {
|
|
58
|
+
return asErrorResult(error.message);
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
41
62
|
};
|
|
42
63
|
|
|
43
64
|
export default { metadata, tool, handler };
|