@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.
Files changed (549) hide show
  1. package/README.md +85 -10
  2. package/code-tool-types.d.mts +16 -0
  3. package/code-tool-types.d.mts.map +1 -0
  4. package/code-tool-types.d.ts +16 -0
  5. package/code-tool-types.d.ts.map +1 -0
  6. package/code-tool-types.js +4 -0
  7. package/code-tool-types.js.map +1 -0
  8. package/code-tool-types.mjs +3 -0
  9. package/code-tool-types.mjs.map +1 -0
  10. package/code-tool.d.mts +54 -0
  11. package/code-tool.d.mts.map +1 -0
  12. package/code-tool.d.ts +54 -0
  13. package/code-tool.d.ts.map +1 -0
  14. package/code-tool.js +54 -0
  15. package/code-tool.js.map +1 -0
  16. package/code-tool.mjs +51 -0
  17. package/code-tool.mjs.map +1 -0
  18. package/compat.d.mts +6 -0
  19. package/compat.d.mts.map +1 -1
  20. package/compat.d.ts +6 -0
  21. package/compat.d.ts.map +1 -1
  22. package/compat.js +52 -7
  23. package/compat.js.map +1 -1
  24. package/compat.mjs +52 -6
  25. package/compat.mjs.map +1 -1
  26. package/docs-search-tool.d.mts +50 -0
  27. package/docs-search-tool.d.mts.map +1 -0
  28. package/docs-search-tool.d.ts +50 -0
  29. package/docs-search-tool.d.ts.map +1 -0
  30. package/docs-search-tool.js +51 -0
  31. package/docs-search-tool.js.map +1 -0
  32. package/docs-search-tool.mjs +47 -0
  33. package/docs-search-tool.mjs.map +1 -0
  34. package/dynamic-tools.d.mts +2 -2
  35. package/dynamic-tools.d.mts.map +1 -1
  36. package/dynamic-tools.d.ts +2 -2
  37. package/dynamic-tools.d.ts.map +1 -1
  38. package/dynamic-tools.js +11 -9
  39. package/dynamic-tools.js.map +1 -1
  40. package/dynamic-tools.mjs +11 -9
  41. package/dynamic-tools.mjs.map +1 -1
  42. package/filtering.d.mts +3 -0
  43. package/filtering.d.mts.map +1 -0
  44. package/filtering.d.ts +3 -0
  45. package/filtering.d.ts.map +1 -0
  46. package/filtering.js +24 -0
  47. package/filtering.js.map +1 -0
  48. package/filtering.mjs +16 -0
  49. package/filtering.mjs.map +1 -0
  50. package/headers.d.mts +4 -0
  51. package/headers.d.mts.map +1 -0
  52. package/headers.d.ts +4 -0
  53. package/headers.d.ts.map +1 -0
  54. package/headers.js +31 -0
  55. package/headers.js.map +1 -0
  56. package/headers.mjs +27 -0
  57. package/headers.mjs.map +1 -0
  58. package/http.d.mts +9 -0
  59. package/http.d.mts.map +1 -0
  60. package/http.d.ts +9 -0
  61. package/http.d.ts.map +1 -0
  62. package/http.js +108 -0
  63. package/http.js.map +1 -0
  64. package/http.mjs +100 -0
  65. package/http.mjs.map +1 -0
  66. package/index.d.mts +1 -0
  67. package/index.d.ts +1 -0
  68. package/index.js +15 -10
  69. package/index.js.map +1 -1
  70. package/index.mjs +18 -12
  71. package/index.mjs.map +1 -1
  72. package/options.d.mts +17 -8
  73. package/options.d.mts.map +1 -1
  74. package/options.d.ts +17 -8
  75. package/options.d.ts.map +1 -1
  76. package/options.js +151 -61
  77. package/options.js.map +1 -1
  78. package/options.mjs +149 -60
  79. package/options.mjs.map +1 -1
  80. package/package.json +161 -12
  81. package/server.d.mts +12 -15
  82. package/server.d.mts.map +1 -1
  83. package/server.d.ts +12 -15
  84. package/server.d.ts.map +1 -1
  85. package/server.js +107 -36
  86. package/server.js.map +1 -1
  87. package/server.mjs +105 -36
  88. package/server.mjs.map +1 -1
  89. package/src/code-tool-types.ts +18 -0
  90. package/src/code-tool.ts +64 -0
  91. package/src/compat.ts +60 -6
  92. package/src/docs-search-tool.ts +59 -0
  93. package/src/dynamic-tools.ts +13 -12
  94. package/src/filtering.ts +18 -0
  95. package/src/headers.ts +35 -0
  96. package/src/http.ts +127 -0
  97. package/src/index.ts +20 -14
  98. package/src/options.ts +185 -73
  99. package/src/server.ts +128 -48
  100. package/src/stdio.ts +13 -0
  101. package/src/tools/access-tokens/create-access-tokens.ts +30 -5
  102. package/src/tools/account/disconnect-account.ts +28 -5
  103. package/src/tools/account/introspect-account.ts +30 -5
  104. package/src/tools/connect/sessions/new-connect-sessions.ts +46 -14
  105. package/src/tools/connect/sessions/reauthenticate-connect-sessions.ts +32 -9
  106. package/src/tools/hris/benefits/create-hris-benefits.ts +45 -18
  107. package/src/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.ts +55 -10
  108. package/src/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.ts +37 -5
  109. package/src/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.ts +36 -5
  110. package/src/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.ts +37 -5
  111. package/src/tools/hris/benefits/list-hris-benefits.ts +38 -5
  112. package/src/tools/hris/benefits/list-supported-benefits-hris-benefits.ts +38 -5
  113. package/src/tools/hris/benefits/retrieve-hris-benefits.ts +37 -5
  114. package/src/tools/hris/benefits/update-hris-benefits.ts +35 -5
  115. package/src/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.ts +35 -5
  116. package/src/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.ts +35 -7
  117. package/src/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.ts +36 -5
  118. package/src/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.ts +37 -5
  119. package/src/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.ts +37 -5
  120. package/src/tools/hris/company/retrieve-hris-company.ts +37 -5
  121. package/src/tools/hris/directory/list-hris-directory.ts +36 -5
  122. package/src/tools/hris/documents/list-hris-documents.ts +34 -5
  123. package/src/tools/hris/documents/retreive-hris-documents.ts +36 -5
  124. package/src/tools/hris/employments/retrieve-many-hris-employments.ts +24 -3
  125. package/src/tools/hris/individuals/retrieve-many-hris-individuals.ts +34 -7
  126. package/src/tools/hris/pay-statements/retrieve-many-hris-pay-statements.ts +24 -3
  127. package/src/tools/hris/payments/list-hris-payments.ts +36 -5
  128. package/src/tools/index.ts +6 -20
  129. package/src/tools/jobs/automated/create-jobs-automated.ts +28 -5
  130. package/src/tools/jobs/automated/list-jobs-automated.ts +27 -5
  131. package/src/tools/jobs/automated/retrieve-jobs-automated.ts +28 -5
  132. package/src/tools/jobs/manual/retrieve-jobs-manual.ts +27 -5
  133. package/src/tools/payroll/pay-groups/list-payroll-pay-groups.ts +36 -5
  134. package/src/tools/payroll/pay-groups/retrieve-payroll-pay-groups.ts +37 -5
  135. package/src/tools/providers/list-providers.ts +31 -5
  136. package/src/tools/request-forwarding/forward-request-forwarding.ts +31 -9
  137. package/src/tools/sandbox/company/update-sandbox-company.ts +37 -9
  138. package/src/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.ts +28 -5
  139. package/src/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.ts +29 -6
  140. package/src/tools/sandbox/connections/create-sandbox-connections.ts +26 -5
  141. package/src/tools/sandbox/directory/create-sandbox-directory.ts +28 -12
  142. package/src/tools/sandbox/employment/update-sandbox-employment.ts +20 -7
  143. package/src/tools/sandbox/individual/update-sandbox-individual.ts +30 -7
  144. package/src/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.ts +32 -5
  145. package/src/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.ts +30 -5
  146. package/src/tools/sandbox/jobs/create-sandbox-jobs.ts +26 -5
  147. package/src/tools/sandbox/payment/create-sandbox-payment.ts +89 -173
  148. package/src/tools/types.ts +115 -0
  149. package/stdio.d.mts +3 -0
  150. package/stdio.d.mts.map +1 -0
  151. package/stdio.d.ts +3 -0
  152. package/stdio.d.ts.map +1 -0
  153. package/stdio.js +14 -0
  154. package/stdio.js.map +1 -0
  155. package/stdio.mjs +10 -0
  156. package/stdio.mjs.map +1 -0
  157. package/tools/access-tokens/create-access-tokens.d.mts +26 -7
  158. package/tools/access-tokens/create-access-tokens.d.mts.map +1 -1
  159. package/tools/access-tokens/create-access-tokens.d.ts +26 -7
  160. package/tools/access-tokens/create-access-tokens.d.ts.map +1 -1
  161. package/tools/access-tokens/create-access-tokens.js +32 -4
  162. package/tools/access-tokens/create-access-tokens.js.map +1 -1
  163. package/tools/access-tokens/create-access-tokens.mjs +29 -4
  164. package/tools/access-tokens/create-access-tokens.mjs.map +1 -1
  165. package/tools/account/disconnect-account.d.mts +26 -7
  166. package/tools/account/disconnect-account.d.mts.map +1 -1
  167. package/tools/account/disconnect-account.d.ts +26 -7
  168. package/tools/account/disconnect-account.d.ts.map +1 -1
  169. package/tools/account/disconnect-account.js +30 -4
  170. package/tools/account/disconnect-account.js.map +1 -1
  171. package/tools/account/disconnect-account.mjs +27 -4
  172. package/tools/account/disconnect-account.mjs.map +1 -1
  173. package/tools/account/introspect-account.d.mts +26 -7
  174. package/tools/account/introspect-account.d.mts.map +1 -1
  175. package/tools/account/introspect-account.d.ts +26 -7
  176. package/tools/account/introspect-account.d.ts.map +1 -1
  177. package/tools/account/introspect-account.js +32 -4
  178. package/tools/account/introspect-account.js.map +1 -1
  179. package/tools/account/introspect-account.mjs +29 -4
  180. package/tools/account/introspect-account.mjs.map +1 -1
  181. package/tools/connect/sessions/new-connect-sessions.d.mts +26 -7
  182. package/tools/connect/sessions/new-connect-sessions.d.mts.map +1 -1
  183. package/tools/connect/sessions/new-connect-sessions.d.ts +26 -7
  184. package/tools/connect/sessions/new-connect-sessions.d.ts.map +1 -1
  185. package/tools/connect/sessions/new-connect-sessions.js +47 -13
  186. package/tools/connect/sessions/new-connect-sessions.js.map +1 -1
  187. package/tools/connect/sessions/new-connect-sessions.mjs +44 -13
  188. package/tools/connect/sessions/new-connect-sessions.mjs.map +1 -1
  189. package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts +26 -7
  190. package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts.map +1 -1
  191. package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts +26 -7
  192. package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts.map +1 -1
  193. package/tools/connect/sessions/reauthenticate-connect-sessions.js +32 -8
  194. package/tools/connect/sessions/reauthenticate-connect-sessions.js.map +1 -1
  195. package/tools/connect/sessions/reauthenticate-connect-sessions.mjs +29 -8
  196. package/tools/connect/sessions/reauthenticate-connect-sessions.mjs.map +1 -1
  197. package/tools/hris/benefits/create-hris-benefits.d.mts +26 -7
  198. package/tools/hris/benefits/create-hris-benefits.d.mts.map +1 -1
  199. package/tools/hris/benefits/create-hris-benefits.d.ts +26 -7
  200. package/tools/hris/benefits/create-hris-benefits.d.ts.map +1 -1
  201. package/tools/hris/benefits/create-hris-benefits.js +48 -17
  202. package/tools/hris/benefits/create-hris-benefits.js.map +1 -1
  203. package/tools/hris/benefits/create-hris-benefits.mjs +45 -17
  204. package/tools/hris/benefits/create-hris-benefits.mjs.map +1 -1
  205. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts +26 -7
  206. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts.map +1 -1
  207. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts +26 -7
  208. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts.map +1 -1
  209. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.js +54 -9
  210. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.js.map +1 -1
  211. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.mjs +51 -9
  212. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.mjs.map +1 -1
  213. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts +26 -7
  214. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts.map +1 -1
  215. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts +26 -7
  216. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts.map +1 -1
  217. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js +37 -4
  218. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js.map +1 -1
  219. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs +34 -4
  220. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs.map +1 -1
  221. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts +26 -7
  222. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts.map +1 -1
  223. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts +26 -7
  224. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts.map +1 -1
  225. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.js +38 -4
  226. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.js.map +1 -1
  227. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.mjs +35 -4
  228. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.mjs.map +1 -1
  229. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts +26 -7
  230. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts.map +1 -1
  231. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts +26 -7
  232. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts.map +1 -1
  233. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.js +37 -4
  234. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.js.map +1 -1
  235. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs +34 -4
  236. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs.map +1 -1
  237. package/tools/hris/benefits/list-hris-benefits.d.mts +26 -7
  238. package/tools/hris/benefits/list-hris-benefits.d.mts.map +1 -1
  239. package/tools/hris/benefits/list-hris-benefits.d.ts +26 -7
  240. package/tools/hris/benefits/list-hris-benefits.d.ts.map +1 -1
  241. package/tools/hris/benefits/list-hris-benefits.js +40 -4
  242. package/tools/hris/benefits/list-hris-benefits.js.map +1 -1
  243. package/tools/hris/benefits/list-hris-benefits.mjs +37 -4
  244. package/tools/hris/benefits/list-hris-benefits.mjs.map +1 -1
  245. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts +26 -7
  246. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts.map +1 -1
  247. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts +26 -7
  248. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts.map +1 -1
  249. package/tools/hris/benefits/list-supported-benefits-hris-benefits.js +40 -4
  250. package/tools/hris/benefits/list-supported-benefits-hris-benefits.js.map +1 -1
  251. package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs +37 -4
  252. package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs.map +1 -1
  253. package/tools/hris/benefits/retrieve-hris-benefits.d.mts +26 -7
  254. package/tools/hris/benefits/retrieve-hris-benefits.d.mts.map +1 -1
  255. package/tools/hris/benefits/retrieve-hris-benefits.d.ts +26 -7
  256. package/tools/hris/benefits/retrieve-hris-benefits.d.ts.map +1 -1
  257. package/tools/hris/benefits/retrieve-hris-benefits.js +37 -4
  258. package/tools/hris/benefits/retrieve-hris-benefits.js.map +1 -1
  259. package/tools/hris/benefits/retrieve-hris-benefits.mjs +34 -4
  260. package/tools/hris/benefits/retrieve-hris-benefits.mjs.map +1 -1
  261. package/tools/hris/benefits/update-hris-benefits.d.mts +26 -7
  262. package/tools/hris/benefits/update-hris-benefits.d.mts.map +1 -1
  263. package/tools/hris/benefits/update-hris-benefits.d.ts +26 -7
  264. package/tools/hris/benefits/update-hris-benefits.d.ts.map +1 -1
  265. package/tools/hris/benefits/update-hris-benefits.js +35 -4
  266. package/tools/hris/benefits/update-hris-benefits.js.map +1 -1
  267. package/tools/hris/benefits/update-hris-benefits.mjs +32 -4
  268. package/tools/hris/benefits/update-hris-benefits.mjs.map +1 -1
  269. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts +26 -7
  270. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts.map +1 -1
  271. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts +26 -7
  272. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts.map +1 -1
  273. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js +38 -4
  274. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js.map +1 -1
  275. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs +35 -4
  276. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs.map +1 -1
  277. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts +26 -7
  278. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts.map +1 -1
  279. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts +26 -7
  280. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts.map +1 -1
  281. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js +36 -6
  282. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js.map +1 -1
  283. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs +33 -6
  284. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs.map +1 -1
  285. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts +26 -7
  286. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts.map +1 -1
  287. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts +26 -7
  288. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts.map +1 -1
  289. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js +37 -4
  290. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js.map +1 -1
  291. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs +34 -4
  292. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs.map +1 -1
  293. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts +26 -7
  294. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts.map +1 -1
  295. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts +26 -7
  296. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts.map +1 -1
  297. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js +40 -4
  298. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js.map +1 -1
  299. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs +37 -4
  300. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs.map +1 -1
  301. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts +26 -7
  302. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts.map +1 -1
  303. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts +26 -7
  304. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts.map +1 -1
  305. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.js +38 -4
  306. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.js.map +1 -1
  307. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.mjs +35 -4
  308. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.mjs.map +1 -1
  309. package/tools/hris/company/retrieve-hris-company.d.mts +26 -7
  310. package/tools/hris/company/retrieve-hris-company.d.mts.map +1 -1
  311. package/tools/hris/company/retrieve-hris-company.d.ts +26 -7
  312. package/tools/hris/company/retrieve-hris-company.d.ts.map +1 -1
  313. package/tools/hris/company/retrieve-hris-company.js +39 -4
  314. package/tools/hris/company/retrieve-hris-company.js.map +1 -1
  315. package/tools/hris/company/retrieve-hris-company.mjs +36 -4
  316. package/tools/hris/company/retrieve-hris-company.mjs.map +1 -1
  317. package/tools/hris/directory/list-hris-directory.d.mts +26 -7
  318. package/tools/hris/directory/list-hris-directory.d.mts.map +1 -1
  319. package/tools/hris/directory/list-hris-directory.d.ts +26 -7
  320. package/tools/hris/directory/list-hris-directory.d.ts.map +1 -1
  321. package/tools/hris/directory/list-hris-directory.js +38 -4
  322. package/tools/hris/directory/list-hris-directory.js.map +1 -1
  323. package/tools/hris/directory/list-hris-directory.mjs +35 -4
  324. package/tools/hris/directory/list-hris-directory.mjs.map +1 -1
  325. package/tools/hris/documents/list-hris-documents.d.mts +26 -7
  326. package/tools/hris/documents/list-hris-documents.d.mts.map +1 -1
  327. package/tools/hris/documents/list-hris-documents.d.ts +26 -7
  328. package/tools/hris/documents/list-hris-documents.d.ts.map +1 -1
  329. package/tools/hris/documents/list-hris-documents.js +37 -4
  330. package/tools/hris/documents/list-hris-documents.js.map +1 -1
  331. package/tools/hris/documents/list-hris-documents.mjs +34 -4
  332. package/tools/hris/documents/list-hris-documents.mjs.map +1 -1
  333. package/tools/hris/documents/retreive-hris-documents.d.mts +26 -7
  334. package/tools/hris/documents/retreive-hris-documents.d.mts.map +1 -1
  335. package/tools/hris/documents/retreive-hris-documents.d.ts +26 -7
  336. package/tools/hris/documents/retreive-hris-documents.d.ts.map +1 -1
  337. package/tools/hris/documents/retreive-hris-documents.js +37 -4
  338. package/tools/hris/documents/retreive-hris-documents.js.map +1 -1
  339. package/tools/hris/documents/retreive-hris-documents.mjs +34 -4
  340. package/tools/hris/documents/retreive-hris-documents.mjs.map +1 -1
  341. package/tools/hris/employments/retrieve-many-hris-employments.d.mts +26 -7
  342. package/tools/hris/employments/retrieve-many-hris-employments.d.mts.map +1 -1
  343. package/tools/hris/employments/retrieve-many-hris-employments.d.ts +26 -7
  344. package/tools/hris/employments/retrieve-many-hris-employments.d.ts.map +1 -1
  345. package/tools/hris/employments/retrieve-many-hris-employments.js +28 -2
  346. package/tools/hris/employments/retrieve-many-hris-employments.js.map +1 -1
  347. package/tools/hris/employments/retrieve-many-hris-employments.mjs +25 -2
  348. package/tools/hris/employments/retrieve-many-hris-employments.mjs.map +1 -1
  349. package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts +26 -7
  350. package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts.map +1 -1
  351. package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts +26 -7
  352. package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts.map +1 -1
  353. package/tools/hris/individuals/retrieve-many-hris-individuals.js +36 -6
  354. package/tools/hris/individuals/retrieve-many-hris-individuals.js.map +1 -1
  355. package/tools/hris/individuals/retrieve-many-hris-individuals.mjs +33 -6
  356. package/tools/hris/individuals/retrieve-many-hris-individuals.mjs.map +1 -1
  357. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts +26 -7
  358. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts.map +1 -1
  359. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts +26 -7
  360. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts.map +1 -1
  361. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js +28 -2
  362. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js.map +1 -1
  363. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs +25 -2
  364. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs.map +1 -1
  365. package/tools/hris/payments/list-hris-payments.d.mts +26 -7
  366. package/tools/hris/payments/list-hris-payments.d.mts.map +1 -1
  367. package/tools/hris/payments/list-hris-payments.d.ts +26 -7
  368. package/tools/hris/payments/list-hris-payments.d.ts.map +1 -1
  369. package/tools/hris/payments/list-hris-payments.js +38 -4
  370. package/tools/hris/payments/list-hris-payments.js.map +1 -1
  371. package/tools/hris/payments/list-hris-payments.mjs +35 -4
  372. package/tools/hris/payments/list-hris-payments.mjs.map +1 -1
  373. package/tools/index.d.mts +2 -13
  374. package/tools/index.d.mts.map +1 -1
  375. package/tools/index.d.ts +2 -13
  376. package/tools/index.d.ts.map +1 -1
  377. package/tools/index.js +3 -4
  378. package/tools/index.js.map +1 -1
  379. package/tools/index.mjs +3 -4
  380. package/tools/index.mjs.map +1 -1
  381. package/tools/jobs/automated/create-jobs-automated.d.mts +26 -7
  382. package/tools/jobs/automated/create-jobs-automated.d.mts.map +1 -1
  383. package/tools/jobs/automated/create-jobs-automated.d.ts +26 -7
  384. package/tools/jobs/automated/create-jobs-automated.d.ts.map +1 -1
  385. package/tools/jobs/automated/create-jobs-automated.js +31 -4
  386. package/tools/jobs/automated/create-jobs-automated.js.map +1 -1
  387. package/tools/jobs/automated/create-jobs-automated.mjs +28 -4
  388. package/tools/jobs/automated/create-jobs-automated.mjs.map +1 -1
  389. package/tools/jobs/automated/list-jobs-automated.d.mts +26 -7
  390. package/tools/jobs/automated/list-jobs-automated.d.mts.map +1 -1
  391. package/tools/jobs/automated/list-jobs-automated.d.ts +26 -7
  392. package/tools/jobs/automated/list-jobs-automated.d.ts.map +1 -1
  393. package/tools/jobs/automated/list-jobs-automated.js +30 -4
  394. package/tools/jobs/automated/list-jobs-automated.js.map +1 -1
  395. package/tools/jobs/automated/list-jobs-automated.mjs +27 -4
  396. package/tools/jobs/automated/list-jobs-automated.mjs.map +1 -1
  397. package/tools/jobs/automated/retrieve-jobs-automated.d.mts +26 -7
  398. package/tools/jobs/automated/retrieve-jobs-automated.d.mts.map +1 -1
  399. package/tools/jobs/automated/retrieve-jobs-automated.d.ts +26 -7
  400. package/tools/jobs/automated/retrieve-jobs-automated.d.ts.map +1 -1
  401. package/tools/jobs/automated/retrieve-jobs-automated.js +30 -4
  402. package/tools/jobs/automated/retrieve-jobs-automated.js.map +1 -1
  403. package/tools/jobs/automated/retrieve-jobs-automated.mjs +27 -4
  404. package/tools/jobs/automated/retrieve-jobs-automated.mjs.map +1 -1
  405. package/tools/jobs/manual/retrieve-jobs-manual.d.mts +26 -7
  406. package/tools/jobs/manual/retrieve-jobs-manual.d.mts.map +1 -1
  407. package/tools/jobs/manual/retrieve-jobs-manual.d.ts +26 -7
  408. package/tools/jobs/manual/retrieve-jobs-manual.d.ts.map +1 -1
  409. package/tools/jobs/manual/retrieve-jobs-manual.js +30 -4
  410. package/tools/jobs/manual/retrieve-jobs-manual.js.map +1 -1
  411. package/tools/jobs/manual/retrieve-jobs-manual.mjs +27 -4
  412. package/tools/jobs/manual/retrieve-jobs-manual.mjs.map +1 -1
  413. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts +26 -7
  414. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts.map +1 -1
  415. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts +26 -7
  416. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts.map +1 -1
  417. package/tools/payroll/pay-groups/list-payroll-pay-groups.js +38 -4
  418. package/tools/payroll/pay-groups/list-payroll-pay-groups.js.map +1 -1
  419. package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs +35 -4
  420. package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs.map +1 -1
  421. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts +26 -7
  422. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts.map +1 -1
  423. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts +26 -7
  424. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts.map +1 -1
  425. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js +37 -4
  426. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js.map +1 -1
  427. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs +34 -4
  428. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs.map +1 -1
  429. package/tools/providers/list-providers.d.mts +26 -7
  430. package/tools/providers/list-providers.d.mts.map +1 -1
  431. package/tools/providers/list-providers.d.ts +26 -7
  432. package/tools/providers/list-providers.d.ts.map +1 -1
  433. package/tools/providers/list-providers.js +33 -4
  434. package/tools/providers/list-providers.js.map +1 -1
  435. package/tools/providers/list-providers.mjs +30 -4
  436. package/tools/providers/list-providers.mjs.map +1 -1
  437. package/tools/request-forwarding/forward-request-forwarding.d.mts +26 -7
  438. package/tools/request-forwarding/forward-request-forwarding.d.mts.map +1 -1
  439. package/tools/request-forwarding/forward-request-forwarding.d.ts +26 -7
  440. package/tools/request-forwarding/forward-request-forwarding.d.ts.map +1 -1
  441. package/tools/request-forwarding/forward-request-forwarding.js +34 -8
  442. package/tools/request-forwarding/forward-request-forwarding.js.map +1 -1
  443. package/tools/request-forwarding/forward-request-forwarding.mjs +31 -8
  444. package/tools/request-forwarding/forward-request-forwarding.mjs.map +1 -1
  445. package/tools/sandbox/company/update-sandbox-company.d.mts +26 -7
  446. package/tools/sandbox/company/update-sandbox-company.d.mts.map +1 -1
  447. package/tools/sandbox/company/update-sandbox-company.d.ts +26 -7
  448. package/tools/sandbox/company/update-sandbox-company.d.ts.map +1 -1
  449. package/tools/sandbox/company/update-sandbox-company.js +39 -8
  450. package/tools/sandbox/company/update-sandbox-company.js.map +1 -1
  451. package/tools/sandbox/company/update-sandbox-company.mjs +36 -8
  452. package/tools/sandbox/company/update-sandbox-company.mjs.map +1 -1
  453. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts +26 -7
  454. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts.map +1 -1
  455. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts +26 -7
  456. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts.map +1 -1
  457. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js +28 -4
  458. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js.map +1 -1
  459. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs +25 -4
  460. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs.map +1 -1
  461. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts +26 -7
  462. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts.map +1 -1
  463. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts +26 -7
  464. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts.map +1 -1
  465. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js +30 -5
  466. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js.map +1 -1
  467. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs +27 -5
  468. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs.map +1 -1
  469. package/tools/sandbox/connections/create-sandbox-connections.d.mts +26 -7
  470. package/tools/sandbox/connections/create-sandbox-connections.d.mts.map +1 -1
  471. package/tools/sandbox/connections/create-sandbox-connections.d.ts +26 -7
  472. package/tools/sandbox/connections/create-sandbox-connections.d.ts.map +1 -1
  473. package/tools/sandbox/connections/create-sandbox-connections.js +28 -4
  474. package/tools/sandbox/connections/create-sandbox-connections.js.map +1 -1
  475. package/tools/sandbox/connections/create-sandbox-connections.mjs +25 -4
  476. package/tools/sandbox/connections/create-sandbox-connections.mjs.map +1 -1
  477. package/tools/sandbox/directory/create-sandbox-directory.d.mts +26 -7
  478. package/tools/sandbox/directory/create-sandbox-directory.d.mts.map +1 -1
  479. package/tools/sandbox/directory/create-sandbox-directory.d.ts +26 -7
  480. package/tools/sandbox/directory/create-sandbox-directory.d.ts.map +1 -1
  481. package/tools/sandbox/directory/create-sandbox-directory.js +30 -11
  482. package/tools/sandbox/directory/create-sandbox-directory.js.map +1 -1
  483. package/tools/sandbox/directory/create-sandbox-directory.mjs +27 -11
  484. package/tools/sandbox/directory/create-sandbox-directory.mjs.map +1 -1
  485. package/tools/sandbox/employment/update-sandbox-employment.d.mts +26 -7
  486. package/tools/sandbox/employment/update-sandbox-employment.d.mts.map +1 -1
  487. package/tools/sandbox/employment/update-sandbox-employment.d.ts +26 -7
  488. package/tools/sandbox/employment/update-sandbox-employment.d.ts.map +1 -1
  489. package/tools/sandbox/employment/update-sandbox-employment.js +24 -6
  490. package/tools/sandbox/employment/update-sandbox-employment.js.map +1 -1
  491. package/tools/sandbox/employment/update-sandbox-employment.mjs +21 -6
  492. package/tools/sandbox/employment/update-sandbox-employment.mjs.map +1 -1
  493. package/tools/sandbox/individual/update-sandbox-individual.d.mts +26 -7
  494. package/tools/sandbox/individual/update-sandbox-individual.d.mts.map +1 -1
  495. package/tools/sandbox/individual/update-sandbox-individual.d.ts +26 -7
  496. package/tools/sandbox/individual/update-sandbox-individual.d.ts.map +1 -1
  497. package/tools/sandbox/individual/update-sandbox-individual.js +30 -6
  498. package/tools/sandbox/individual/update-sandbox-individual.js.map +1 -1
  499. package/tools/sandbox/individual/update-sandbox-individual.mjs +27 -6
  500. package/tools/sandbox/individual/update-sandbox-individual.mjs.map +1 -1
  501. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts +26 -7
  502. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts.map +1 -1
  503. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts +26 -7
  504. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts.map +1 -1
  505. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js +32 -4
  506. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js.map +1 -1
  507. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs +29 -4
  508. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs.map +1 -1
  509. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts +26 -7
  510. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts.map +1 -1
  511. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts +26 -7
  512. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts.map +1 -1
  513. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js +30 -4
  514. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js.map +1 -1
  515. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs +27 -4
  516. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs.map +1 -1
  517. package/tools/sandbox/jobs/create-sandbox-jobs.d.mts +26 -7
  518. package/tools/sandbox/jobs/create-sandbox-jobs.d.mts.map +1 -1
  519. package/tools/sandbox/jobs/create-sandbox-jobs.d.ts +26 -7
  520. package/tools/sandbox/jobs/create-sandbox-jobs.d.ts.map +1 -1
  521. package/tools/sandbox/jobs/create-sandbox-jobs.js +28 -4
  522. package/tools/sandbox/jobs/create-sandbox-jobs.js.map +1 -1
  523. package/tools/sandbox/jobs/create-sandbox-jobs.mjs +25 -4
  524. package/tools/sandbox/jobs/create-sandbox-jobs.mjs.map +1 -1
  525. package/tools/sandbox/payment/create-sandbox-payment.d.mts +26 -7
  526. package/tools/sandbox/payment/create-sandbox-payment.d.mts.map +1 -1
  527. package/tools/sandbox/payment/create-sandbox-payment.d.ts +26 -7
  528. package/tools/sandbox/payment/create-sandbox-payment.d.ts.map +1 -1
  529. package/tools/sandbox/payment/create-sandbox-payment.js +91 -167
  530. package/tools/sandbox/payment/create-sandbox-payment.js.map +1 -1
  531. package/tools/sandbox/payment/create-sandbox-payment.mjs +88 -167
  532. package/tools/sandbox/payment/create-sandbox-payment.mjs.map +1 -1
  533. package/tools/types.d.mts +52 -0
  534. package/tools/types.d.mts.map +1 -0
  535. package/tools/types.d.ts +52 -0
  536. package/tools/types.d.ts.map +1 -0
  537. package/tools/types.js +58 -0
  538. package/tools/types.js.map +1 -0
  539. package/tools/types.mjs +53 -0
  540. package/tools/types.mjs.map +1 -0
  541. package/src/tools/hris/directory/list-individuals-hris-directory.ts +0 -36
  542. package/tools/hris/directory/list-individuals-hris-directory.d.mts +0 -32
  543. package/tools/hris/directory/list-individuals-hris-directory.d.mts.map +0 -1
  544. package/tools/hris/directory/list-individuals-hris-directory.d.ts +0 -32
  545. package/tools/hris/directory/list-individuals-hris-directory.d.ts.map +0 -1
  546. package/tools/hris/directory/list-individuals-hris-directory.js +0 -33
  547. package/tools/hris/directory/list-individuals-hris-directory.js.map +0 -1
  548. package/tools/hris/directory/list-individuals-hris-directory.mjs +0 -29
  549. package/tools/hris/directory/list-individuals-hris-directory.mjs.map +0 -1
@@ -1,26 +1,49 @@
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: 'account',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/disconnect',
15
+ operationId: 'post-disconnect',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'disconnect_account',
15
- description: 'Disconnect one or more `access_token`s from your application.',
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\nDisconnect one or more `access_token`s from your application.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/disconnect_response',\n $defs: {\n disconnect_response: {\n type: 'object',\n properties: {\n status: {\n type: 'string',\n description: 'If the request is successful, Finch will return \"success\" (HTTP 200 status).'\n }\n },\n required: [ 'status'\n ]\n }\n }\n}\n```",
16
22
  inputSchema: {
17
23
  type: 'object',
18
- properties: {},
24
+ properties: {
25
+ jq_filter: {
26
+ type: 'string',
27
+ title: 'jq Filter',
28
+ description:
29
+ '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/).',
30
+ },
31
+ },
32
+ required: [],
19
33
  },
34
+ annotations: {},
20
35
  };
21
36
 
22
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
23
- return client.account.disconnect();
37
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
38
+ const { jq_filter } = args as any;
39
+ try {
40
+ return asTextContentResult(await maybeFilter(jq_filter, await client.account.disconnect()));
41
+ } catch (error) {
42
+ if (error instanceof Finch.APIError || isJqError(error)) {
43
+ return asErrorResult(error.message);
44
+ }
45
+ throw error;
46
+ }
24
47
  };
25
48
 
26
49
  export default { metadata, tool, handler };
@@ -1,26 +1,51 @@
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: 'account',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/introspect',
15
+ operationId: 'get-introspect',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'introspect_account',
15
- description: 'Read account information associated with an `access_token`',
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 account information associated with an `access_token`\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/introspection',\n $defs: {\n introspection: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The Finch UUID of the token being introspected'\n },\n client_id: {\n type: 'string',\n description: 'The client ID of the application associated with the `access_token`'\n },\n client_type: {\n type: 'string',\n title: 'ClientType',\n description: 'The type of application associated with a token.',\n enum: [ 'development',\n 'production',\n 'sandbox'\n ]\n },\n connection_id: {\n type: 'string',\n description: 'The Finch UUID of the connection associated with the `access_token`'\n },\n connection_status: {\n type: 'object',\n properties: {\n status: {\n $ref: '#/$defs/connection_status_type'\n },\n last_successful_sync: {\n anyOf: [ {\n type: 'string',\n format: 'date-time'\n },\n {\n type: 'string'\n }\n ],\n description: 'The datetime when the connection was last successfully synced'\n },\n message: {\n type: 'string'\n }\n },\n required: [ 'status'\n ]\n },\n connection_type: {\n type: 'string',\n title: 'ConnectionType',\n description: 'The type of the connection associated with the token.\\n- `provider` - connection to an external provider\\n- `finch` - finch-generated data.',\n enum: [ 'finch',\n 'provider'\n ]\n },\n products: {\n type: 'array',\n description: 'An array of the authorized products associated with the `access_token`.',\n items: {\n type: 'string'\n }\n },\n provider_id: {\n type: 'string',\n description: 'The ID of the provider associated with the `access_token`.'\n },\n account_id: {\n type: 'string',\n description: '[DEPRECATED] Use `connection_id` to associate tokens with a Finch connection instead of this account ID'\n },\n authentication_methods: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n description: 'The type of authentication method',\n enum: [ 'assisted',\n 'credential',\n 'api_token',\n 'api_credential',\n 'oauth'\n ]\n },\n connection_status: {\n type: 'object',\n properties: {\n status: {\n $ref: '#/$defs/connection_status_type'\n },\n last_successful_sync: {\n anyOf: [ {\n type: 'string',\n format: 'date-time'\n },\n {\n type: 'string'\n }\n ],\n description: 'The datetime when the connection was last successfully synced'\n },\n message: {\n type: 'string'\n }\n },\n required: [ 'status'\n ]\n },\n products: {\n type: 'array',\n description: 'An array of the authorized products associated with the `access_token`',\n items: {\n type: 'string'\n }\n }\n },\n required: [ 'type'\n ]\n }\n },\n company_id: {\n type: 'string',\n description: '[DEPRECATED] Use `connection_id` to associate tokens with a Finch connection instead of this company ID'\n },\n customer_email: {\n type: 'string',\n description: 'The email of your customer you provided to Finch when a connect session was created for this connection'\n },\n customer_id: {\n type: 'string',\n description: 'The ID of your customer you provided to Finch when a connect session was created for this connection'\n },\n customer_name: {\n type: 'string',\n description: 'The name of your customer you provided to Finch when a connect session was created for this connection'\n },\n entities: {\n type: 'array',\n description: 'Array of detailed entity information for each connected account in multi-account mode',\n items: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n description: 'The connection account ID for this entity'\n },\n name: {\n type: 'string',\n description: 'The name of the entity (payroll provider company name)'\n },\n source_id: {\n type: 'string',\n description: 'The source ID of the entity'\n }\n },\n required: [ 'id',\n 'name',\n 'source_id'\n ]\n }\n },\n manual: {\n type: 'boolean',\n description: 'Whether the connection associated with the `access_token` uses the Assisted Connect Flow. (`true` if using Assisted Connect, `false` if connection is automated)'\n },\n payroll_provider_id: {\n type: 'string',\n description: '[DEPRECATED] Use `provider_id` to identify the provider instead of this payroll provider ID.'\n },\n username: {\n type: 'string',\n description: 'The account username used for login associated with the `access_token`.'\n }\n },\n required: [ 'id',\n 'client_id',\n 'client_type',\n 'connection_id',\n 'connection_status',\n 'connection_type',\n 'products',\n 'provider_id'\n ]\n },\n connection_status_type: {\n type: 'string',\n enum: [ 'pending',\n 'processing',\n 'connected',\n 'error_no_account_setup',\n 'error_permissions',\n 'reauth'\n ]\n }\n }\n}\n```",
16
22
  inputSchema: {
17
23
  type: 'object',
18
- properties: {},
24
+ properties: {
25
+ jq_filter: {
26
+ type: 'string',
27
+ title: 'jq Filter',
28
+ description:
29
+ '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/).',
30
+ },
31
+ },
32
+ required: [],
33
+ },
34
+ annotations: {
35
+ readOnlyHint: true,
19
36
  },
20
37
  };
21
38
 
22
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
23
- return client.account.introspect();
39
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
40
+ const { jq_filter } = args as any;
41
+ try {
42
+ return asTextContentResult(await maybeFilter(jq_filter, await client.account.introspect()));
43
+ } catch (error) {
44
+ if (error instanceof Finch.APIError || isJqError(error)) {
45
+ return asErrorResult(error.message);
46
+ }
47
+ throw error;
48
+ }
24
49
  };
25
50
 
26
51
  export default { metadata, tool, handler };
@@ -1,83 +1,115 @@
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: 'connect.sessions',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/connect/sessions',
15
+ operationId: 'post-connect-sessions',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'new_connect_sessions',
15
- description: 'Create a new connect session for an employer',
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\nCreate a new connect session for an employer\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_new_response',\n $defs: {\n session_new_response: {\n type: 'object',\n properties: {\n connect_url: {\n type: 'string',\n description: 'The Connect URL to redirect the user to for authentication'\n },\n session_id: {\n type: 'string',\n description: 'The unique identifier for the created connect session'\n }\n },\n required: [ 'connect_url',\n 'session_id'\n ]\n }\n }\n}\n```",
16
22
  inputSchema: {
17
23
  type: 'object',
18
24
  properties: {
19
25
  customer_id: {
20
26
  type: 'string',
27
+ description: 'Unique identifier for the customer',
21
28
  },
22
29
  customer_name: {
23
30
  type: 'string',
31
+ description: 'Name of the customer',
24
32
  },
25
33
  products: {
26
34
  type: 'array',
35
+ description: 'The Finch products to request access to',
27
36
  items: {
28
37
  type: 'string',
29
38
  description: 'The Finch products that can be requested during the Connect flow.',
30
39
  enum: [
40
+ 'benefits',
31
41
  'company',
42
+ 'deduction',
32
43
  'directory',
33
- 'individual',
44
+ 'documents',
34
45
  'employment',
46
+ 'individual',
35
47
  'payment',
36
48
  'pay_statement',
37
- 'benefits',
38
49
  'ssn',
39
- 'deduction',
40
- 'documents',
41
50
  ],
42
51
  },
43
52
  },
44
53
  customer_email: {
45
54
  type: 'string',
55
+ description: 'Email address of the customer',
46
56
  },
47
57
  integration: {
48
58
  type: 'object',
59
+ description: 'Integration configuration for the connect session',
49
60
  properties: {
50
- auth_method: {
61
+ provider: {
51
62
  type: 'string',
52
- enum: ['assisted', 'credential', 'oauth', 'api_token'],
63
+ description: 'The provider to integrate with',
53
64
  },
54
- provider: {
65
+ auth_method: {
55
66
  type: 'string',
67
+ description: 'The authentication method to use',
68
+ enum: ['assisted', 'credential', 'oauth', 'api_token'],
56
69
  },
57
70
  },
58
- required: [],
71
+ required: ['provider'],
59
72
  },
60
73
  manual: {
61
74
  type: 'boolean',
75
+ description: 'Enable manual authentication mode',
62
76
  },
63
77
  minutes_to_expire: {
64
78
  type: 'number',
65
- description: 'The number of minutes until the session expires (defaults to 43,200, which is 30 days)',
79
+ description:
80
+ 'The number of minutes until the session expires (defaults to 129,600, which is 90 days)',
66
81
  },
67
82
  redirect_uri: {
68
83
  type: 'string',
84
+ description: 'The URI to redirect to after the Connect flow is completed',
69
85
  },
70
86
  sandbox: {
71
87
  type: 'string',
88
+ description: 'Sandbox mode for testing',
72
89
  enum: ['finch', 'provider'],
73
90
  },
91
+ jq_filter: {
92
+ type: 'string',
93
+ title: 'jq Filter',
94
+ description:
95
+ '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/).',
96
+ },
74
97
  },
98
+ required: ['customer_id', 'customer_name', 'products'],
75
99
  },
100
+ annotations: {},
76
101
  };
77
102
 
78
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
79
- const body = args as any;
80
- return client.connect.sessions.new(body);
103
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
104
+ const { jq_filter, ...body } = args as any;
105
+ try {
106
+ return asTextContentResult(await maybeFilter(jq_filter, await client.connect.sessions.new(body)));
107
+ } catch (error) {
108
+ if (error instanceof Finch.APIError || isJqError(error)) {
109
+ return asErrorResult(error.message);
110
+ }
111
+ throw error;
112
+ }
81
113
  };
82
114
 
83
115
  export default { metadata, tool, handler };
@@ -1,18 +1,24 @@
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: 'connect.sessions',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/connect/sessions/reauthenticate',
15
+ operationId: 'post-connect-sessions-reauthenticate',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'reauthenticate_connect_sessions',
15
- description: 'Create a new Connect session for reauthenticating an existing connection',
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\nCreate a new Connect session for reauthenticating an existing connection\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_reauthenticate_response',\n $defs: {\n session_reauthenticate_response: {\n type: 'object',\n properties: {\n connect_url: {\n type: 'string',\n description: 'The Connect URL to redirect the user to for reauthentication'\n },\n session_id: {\n type: 'string',\n description: 'The unique identifier for the created connect session'\n }\n },\n required: [ 'connect_url',\n 'session_id'\n ]\n }\n }\n}\n```",
16
22
  inputSchema: {
17
23
  type: 'object',
18
24
  properties: {
@@ -31,16 +37,16 @@ export const tool: Tool = {
31
37
  type: 'string',
32
38
  description: 'The Finch products that can be requested during the Connect flow.',
33
39
  enum: [
40
+ 'benefits',
34
41
  'company',
42
+ 'deduction',
35
43
  'directory',
36
- 'individual',
44
+ 'documents',
37
45
  'employment',
46
+ 'individual',
38
47
  'payment',
39
48
  'pay_statement',
40
- 'benefits',
41
49
  'ssn',
42
- 'deduction',
43
- 'documents',
44
50
  ],
45
51
  },
46
52
  },
@@ -48,13 +54,30 @@ export const tool: Tool = {
48
54
  type: 'string',
49
55
  description: 'The URI to redirect to after the Connect flow is completed',
50
56
  },
57
+ jq_filter: {
58
+ type: 'string',
59
+ title: 'jq Filter',
60
+ description:
61
+ '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/).',
62
+ },
51
63
  },
64
+ required: ['connection_id'],
52
65
  },
66
+ annotations: {},
53
67
  };
54
68
 
55
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
56
- const body = args as any;
57
- return client.connect.sessions.reauthenticate(body);
69
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
70
+ const { jq_filter, ...body } = args as any;
71
+ try {
72
+ return asTextContentResult(
73
+ await maybeFilter(jq_filter, await client.connect.sessions.reauthenticate(body)),
74
+ );
75
+ } catch (error) {
76
+ if (error instanceof Finch.APIError || isJqError(error)) {
77
+ return asErrorResult(error.message);
78
+ }
79
+ throw error;
80
+ }
58
81
  };
59
82
 
60
83
  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.benefits',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/employer/benefits',
15
+ operationId: 'create-company-benefits',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'create_hris_benefits',
15
20
  description:
16
- 'Creates a new company-wide deduction or contribution. Please use the `/providers` endpoint to view available types for each provider.',
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\nCreates a new company-wide deduction or contribution. Please use the `/providers` endpoint to view available types for each provider.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/create_company_benefits_response',\n $defs: {\n create_company_benefits_response: {\n type: 'object',\n properties: {\n benefit_id: {\n type: 'string',\n description: 'The id of the benefit.'\n },\n job_id: {\n type: 'string'\n }\n },\n required: [ 'benefit_id',\n 'job_id'\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
  company_contribution: {
21
33
  type: 'object',
22
34
  title: 'BenefitCompanyMatchContribution',
@@ -34,7 +46,7 @@ export const tool: Tool = {
34
46
  type: 'integer',
35
47
  },
36
48
  },
37
- required: [],
49
+ required: ['match', 'threshold'],
38
50
  },
39
51
  },
40
52
  type: {
@@ -42,7 +54,7 @@ export const tool: Tool = {
42
54
  enum: ['match'],
43
55
  },
44
56
  },
45
- required: [],
57
+ required: ['tiers', 'type'],
46
58
  },
47
59
  description: {
48
60
  type: 'string',
@@ -56,47 +68,62 @@ export const tool: Tool = {
56
68
  type: {
57
69
  $ref: '#/$defs/benefit_type',
58
70
  },
71
+ jq_filter: {
72
+ type: 'string',
73
+ title: 'jq Filter',
74
+ description:
75
+ '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/).',
76
+ },
59
77
  },
78
+ required: [],
60
79
  $defs: {
61
80
  benefit_frequency: {
62
81
  type: 'string',
63
82
  title: 'BenefitFrequency',
64
83
  description: 'The frequency of the benefit deduction/contribution.',
65
- enum: ['one_time', 'every_paycheck', 'monthly'],
84
+ enum: ['every_paycheck', 'monthly', 'one_time'],
66
85
  },
67
86
  benefit_type: {
68
87
  type: 'string',
69
88
  title: 'BenefitType',
70
89
  description: 'Type of benefit.',
71
90
  enum: [
91
+ '457',
72
92
  '401k',
73
93
  '401k_roth',
74
94
  '401k_loan',
75
95
  '403b',
76
96
  '403b_roth',
77
- '457',
78
97
  '457_roth',
79
- 's125_medical',
80
- 's125_dental',
81
- 's125_vision',
82
- 'hsa_pre',
83
- 'hsa_post',
84
- 'fsa_medical',
85
- 'fsa_dependent_care',
86
- 'simple_ira',
87
- 'simple',
88
98
  'commuter',
89
99
  'custom_post_tax',
90
100
  'custom_pre_tax',
101
+ 'fsa_dependent_care',
102
+ 'fsa_medical',
103
+ 'hsa_post',
104
+ 'hsa_pre',
105
+ 's125_dental',
106
+ 's125_medical',
107
+ 's125_vision',
108
+ 'simple',
109
+ 'simple_ira',
91
110
  ],
92
111
  },
93
112
  },
94
113
  },
114
+ annotations: {},
95
115
  };
96
116
 
97
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
98
- const body = args as any;
99
- return client.hris.benefits.create(body);
117
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
118
+ const { jq_filter, ...body } = args as any;
119
+ try {
120
+ return asTextContentResult(await maybeFilter(jq_filter, await client.hris.benefits.create(body)));
121
+ } catch (error) {
122
+ if (error instanceof Finch.APIError || isJqError(error)) {
123
+ return asErrorResult(error.message);
124
+ }
125
+ throw error;
126
+ }
100
127
  };
101
128
 
102
129
  export default { metadata, tool, handler };
@@ -1,25 +1,37 @@
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.benefits.individuals',
9
11
  operation: 'write',
10
12
  tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/employer/benefits/{benefit_id}/individuals',
15
+ operationId: 'post-employer-individual-benefits-benefit_id',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'enroll_many_benefits_hris_individuals',
15
20
  description:
16
- 'Enroll an individual into a deduction or contribution. This is an overwrite operation. If the employee is already enrolled, the enrollment amounts will be adjusted. Making the same request multiple times will not create new enrollments, but will continue to set the state of the existing enrollment.',
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\nEnroll an individual into a deduction or contribution. This is an overwrite operation. If the employee is already enrolled, the enrollment amounts will be adjusted. Making the same request multiple times will not create new enrollments, but will continue to set the state of the existing enrollment.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/enrolled_individual_benefit_response',\n $defs: {\n enrolled_individual_benefit_response: {\n type: 'object',\n properties: {\n job_id: {\n type: 'string'\n }\n },\n required: [ 'job_id'\n ]\n }\n }\n}\n```",
17
22
  inputSchema: {
18
23
  type: 'object',
19
24
  properties: {
20
25
  benefit_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
+ },
23
35
  individuals: {
24
36
  type: 'array',
25
37
  description: 'Array of the individual_id to enroll and a configuration object.',
@@ -51,12 +63,31 @@ export const tool: Tool = {
51
63
  description:
52
64
  'Amount in cents for fixed type or basis points (1/100th of a percent) for percent type',
53
65
  },
66
+ tiers: {
67
+ type: 'array',
68
+ description:
69
+ 'Array of tier objects for tiered contribution matching (required when type is tiered)',
70
+ items: {
71
+ type: 'object',
72
+ properties: {
73
+ match: {
74
+ type: 'integer',
75
+ description: 'The employer match percentage in basis points (0-10000 = 0-100%)',
76
+ },
77
+ threshold: {
78
+ type: 'integer',
79
+ description:
80
+ 'The employee contribution threshold in basis points (0-10000 = 0-100%)',
81
+ },
82
+ },
83
+ required: ['match', 'threshold'],
84
+ },
85
+ },
54
86
  type: {
55
87
  type: 'string',
56
- enum: ['fixed', 'percent'],
88
+ enum: ['fixed', 'percent', 'tiered'],
57
89
  },
58
90
  },
59
- required: [],
60
91
  },
61
92
  effective_date: {
62
93
  type: 'string',
@@ -76,26 +107,40 @@ export const tool: Tool = {
76
107
  enum: ['fixed', 'percent'],
77
108
  },
78
109
  },
79
- required: [],
80
110
  },
81
111
  },
82
- required: [],
83
112
  },
84
113
  individual_id: {
85
114
  type: 'string',
86
115
  description: 'Finch id (uuidv4) for the individual to enroll',
87
116
  },
88
117
  },
89
- required: [],
90
118
  },
91
119
  },
120
+ jq_filter: {
121
+ type: 'string',
122
+ title: 'jq Filter',
123
+ description:
124
+ '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/).',
125
+ },
92
126
  },
127
+ required: ['benefit_id'],
93
128
  },
129
+ annotations: {},
94
130
  };
95
131
 
96
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
97
- const { benefit_id, ...body } = args as any;
98
- return client.hris.benefits.individuals.enrollMany(benefit_id, body['individuals']);
132
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
133
+ const { benefit_id, jq_filter, ...body } = args as any;
134
+ try {
135
+ return asTextContentResult(
136
+ await maybeFilter(jq_filter, await client.hris.benefits.individuals.enrollMany(benefit_id, body)),
137
+ );
138
+ } catch (error) {
139
+ if (error instanceof Finch.APIError || isJqError(error)) {
140
+ return asErrorResult(error.message);
141
+ }
142
+ throw error;
143
+ }
99
144
  };
100
145
 
101
146
  export default { metadata, tool, handler };
@@ -1,31 +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.benefits.individuals',
9
11
  operation: 'read',
10
12
  tags: [],
13
+ httpMethod: 'get',
14
+ httpPath: '/employer/benefits/{benefit_id}/enrolled',
15
+ operationId: 'get-company-benefits-enrolled',
11
16
  };
12
17
 
13
18
  export const tool: Tool = {
14
19
  name: 'enrolled_ids_benefits_hris_individuals',
15
- description: 'Lists individuals currently enrolled in a given deduction.',
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\nLists individuals currently enrolled in a given deduction.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/individual_enrolled_ids_response',\n $defs: {\n individual_enrolled_ids_response: {\n type: 'object',\n properties: {\n benefit_id: {\n type: 'string',\n description: 'The id of the benefit.'\n },\n individual_ids: {\n type: 'array',\n items: {\n type: 'string',\n description: 'A stable Finch `id` (UUID v4) for an individual in the company.'\n }\n }\n },\n required: [ 'benefit_id',\n 'individual_ids'\n ]\n }\n }\n}\n```",
16
22
  inputSchema: {
17
23
  type: 'object',
18
24
  properties: {
19
25
  benefit_id: {
20
26
  type: 'string',
21
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
+ },
22
41
  },
42
+ required: ['benefit_id'],
43
+ },
44
+ annotations: {
45
+ readOnlyHint: true,
23
46
  },
24
47
  };
25
48
 
26
- export const handler = (client: Finch, args: Record<string, unknown> | undefined) => {
27
- const { benefit_id, ...body } = args as any;
28
- return client.hris.benefits.individuals.enrolledIds(benefit_id);
49
+ export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
50
+ const { benefit_id, jq_filter, ...body } = args as any;
51
+ try {
52
+ return asTextContentResult(
53
+ await maybeFilter(jq_filter, await client.hris.benefits.individuals.enrolledIDs(benefit_id, body)),
54
+ );
55
+ } catch (error) {
56
+ if (error instanceof Finch.APIError || isJqError(error)) {
57
+ return asErrorResult(error.message);
58
+ }
59
+ throw error;
60
+ }
29
61
  };
30
62
 
31
63
  export default { metadata, tool, handler };