@tryfinch/finch-api-mcp 7.0.0 → 8.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 (530) hide show
  1. package/README.md +13 -301
  2. package/code-tool.d.mts +2 -44
  3. package/code-tool.d.mts.map +1 -1
  4. package/code-tool.d.ts +2 -44
  5. package/code-tool.d.ts.map +1 -1
  6. package/code-tool.js +3 -2
  7. package/code-tool.js.map +1 -1
  8. package/code-tool.mjs +3 -2
  9. package/code-tool.mjs.map +1 -1
  10. package/docs-search-tool.d.mts +3 -3
  11. package/docs-search-tool.d.mts.map +1 -1
  12. package/docs-search-tool.d.ts +3 -3
  13. package/docs-search-tool.d.ts.map +1 -1
  14. package/docs-search-tool.js +1 -1
  15. package/docs-search-tool.js.map +1 -1
  16. package/docs-search-tool.mjs +1 -1
  17. package/http.d.mts.map +1 -1
  18. package/http.d.ts.map +1 -1
  19. package/http.js +1 -18
  20. package/http.js.map +1 -1
  21. package/http.mjs +1 -18
  22. package/http.mjs.map +1 -1
  23. package/index.js +4 -40
  24. package/index.js.map +1 -1
  25. package/index.mjs +4 -40
  26. package/index.mjs.map +1 -1
  27. package/options.d.mts +0 -9
  28. package/options.d.mts.map +1 -1
  29. package/options.d.ts +0 -9
  30. package/options.d.ts.map +1 -1
  31. package/options.js +4 -359
  32. package/options.js.map +1 -1
  33. package/options.mjs +4 -359
  34. package/options.mjs.map +1 -1
  35. package/package.json +9 -49
  36. package/server.d.mts +3 -8
  37. package/server.d.mts.map +1 -1
  38. package/server.d.ts +3 -8
  39. package/server.d.ts.map +1 -1
  40. package/server.js +12 -65
  41. package/server.js.map +1 -1
  42. package/server.mjs +11 -62
  43. package/server.mjs.map +1 -1
  44. package/src/code-tool.ts +3 -2
  45. package/src/docs-search-tool.ts +1 -1
  46. package/src/http.ts +1 -19
  47. package/src/index.ts +5 -52
  48. package/src/options.ts +5 -386
  49. package/src/server.ts +12 -72
  50. package/src/stdio.ts +2 -3
  51. package/src/{tools/types.ts → types.ts} +1 -1
  52. package/stdio.d.mts +1 -2
  53. package/stdio.d.mts.map +1 -1
  54. package/stdio.d.ts +1 -2
  55. package/stdio.d.ts.map +1 -1
  56. package/stdio.js +2 -2
  57. package/stdio.js.map +1 -1
  58. package/stdio.mjs +2 -2
  59. package/stdio.mjs.map +1 -1
  60. package/{tools/types.d.mts → types.d.mts} +1 -1
  61. package/types.d.mts.map +1 -0
  62. package/{tools/types.d.ts → types.d.ts} +1 -1
  63. package/types.d.ts.map +1 -0
  64. package/types.js.map +1 -0
  65. package/types.mjs.map +1 -0
  66. package/compat.d.mts +0 -58
  67. package/compat.d.mts.map +0 -1
  68. package/compat.d.ts +0 -58
  69. package/compat.d.ts.map +0 -1
  70. package/compat.js +0 -387
  71. package/compat.js.map +0 -1
  72. package/compat.mjs +0 -378
  73. package/compat.mjs.map +0 -1
  74. package/dynamic-tools.d.mts +0 -12
  75. package/dynamic-tools.d.mts.map +0 -1
  76. package/dynamic-tools.d.ts +0 -12
  77. package/dynamic-tools.d.ts.map +0 -1
  78. package/dynamic-tools.js +0 -135
  79. package/dynamic-tools.js.map +0 -1
  80. package/dynamic-tools.mjs +0 -132
  81. package/dynamic-tools.mjs.map +0 -1
  82. package/filtering.d.mts +0 -3
  83. package/filtering.d.mts.map +0 -1
  84. package/filtering.d.ts +0 -3
  85. package/filtering.d.ts.map +0 -1
  86. package/filtering.js +0 -24
  87. package/filtering.js.map +0 -1
  88. package/filtering.mjs +0 -16
  89. package/filtering.mjs.map +0 -1
  90. package/src/compat.ts +0 -483
  91. package/src/dynamic-tools.ts +0 -153
  92. package/src/filtering.ts +0 -18
  93. package/src/tools/access-tokens/create-access-tokens.ts +0 -65
  94. package/src/tools/account/disconnect-account.ts +0 -49
  95. package/src/tools/account/introspect-account.ts +0 -51
  96. package/src/tools/connect/sessions/new-connect-sessions.ts +0 -115
  97. package/src/tools/connect/sessions/reauthenticate-connect-sessions.ts +0 -83
  98. package/src/tools/hris/benefits/create-hris-benefits.ts +0 -129
  99. package/src/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.ts +0 -146
  100. package/src/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.ts +0 -63
  101. package/src/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.ts +0 -67
  102. package/src/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.ts +0 -70
  103. package/src/tools/hris/benefits/list-hris-benefits.ts +0 -59
  104. package/src/tools/hris/benefits/list-supported-benefits-hris-benefits.ts +0 -59
  105. package/src/tools/hris/benefits/retrieve-hris-benefits.ts +0 -63
  106. package/src/tools/hris/benefits/update-hris-benefits.ts +0 -65
  107. package/src/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.ts +0 -88
  108. package/src/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.ts +0 -106
  109. package/src/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.ts +0 -63
  110. package/src/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.ts +0 -59
  111. package/src/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.ts +0 -67
  112. package/src/tools/hris/company/retrieve-hris-company.ts +0 -58
  113. package/src/tools/hris/directory/list-hris-directory.ts +0 -67
  114. package/src/tools/hris/documents/list-hris-documents.ts +0 -82
  115. package/src/tools/hris/documents/retreive-hris-documents.ts +0 -63
  116. package/src/tools/hris/employments/retrieve-many-hris-employments.ts +0 -64
  117. package/src/tools/hris/individuals/retrieve-many-hris-individuals.ts +0 -79
  118. package/src/tools/hris/pay-statements/retrieve-many-hris-pay-statements.ts +0 -72
  119. package/src/tools/hris/payments/list-hris-payments.ts +0 -69
  120. package/src/tools/index.ts +0 -161
  121. package/src/tools/jobs/automated/create-jobs-automated.ts +0 -82
  122. package/src/tools/jobs/automated/list-jobs-automated.ts +0 -59
  123. package/src/tools/jobs/automated/retrieve-jobs-automated.ts +0 -54
  124. package/src/tools/jobs/manual/retrieve-jobs-manual.ts +0 -54
  125. package/src/tools/payroll/pay-groups/list-payroll-pay-groups.ts +0 -68
  126. package/src/tools/payroll/pay-groups/retrieve-payroll-pay-groups.ts +0 -63
  127. package/src/tools/providers/list-providers.ts +0 -52
  128. package/src/tools/request-forwarding/forward-request-forwarding.ts +0 -76
  129. package/src/tools/sandbox/company/update-sandbox-company.ts +0 -192
  130. package/src/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.ts +0 -71
  131. package/src/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.ts +0 -62
  132. package/src/tools/sandbox/connections/create-sandbox-connections.ts +0 -69
  133. package/src/tools/sandbox/directory/create-sandbox-directory.ts +0 -319
  134. package/src/tools/sandbox/employment/update-sandbox-employment.ts +0 -236
  135. package/src/tools/sandbox/individual/update-sandbox-individual.ts +0 -177
  136. package/src/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.ts +0 -53
  137. package/src/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.ts +0 -61
  138. package/src/tools/sandbox/jobs/create-sandbox-jobs.ts +0 -54
  139. package/src/tools/sandbox/payment/create-sandbox-payment.ts +0 -224
  140. package/src/tools.ts +0 -1
  141. package/tools/access-tokens/create-access-tokens.d.mts +0 -51
  142. package/tools/access-tokens/create-access-tokens.d.mts.map +0 -1
  143. package/tools/access-tokens/create-access-tokens.d.ts +0 -51
  144. package/tools/access-tokens/create-access-tokens.d.ts.map +0 -1
  145. package/tools/access-tokens/create-access-tokens.js +0 -65
  146. package/tools/access-tokens/create-access-tokens.js.map +0 -1
  147. package/tools/access-tokens/create-access-tokens.mjs +0 -58
  148. package/tools/access-tokens/create-access-tokens.mjs.map +0 -1
  149. package/tools/account/disconnect-account.d.mts +0 -51
  150. package/tools/account/disconnect-account.d.mts.map +0 -1
  151. package/tools/account/disconnect-account.d.ts +0 -51
  152. package/tools/account/disconnect-account.d.ts.map +0 -1
  153. package/tools/account/disconnect-account.js +0 -49
  154. package/tools/account/disconnect-account.js.map +0 -1
  155. package/tools/account/disconnect-account.mjs +0 -42
  156. package/tools/account/disconnect-account.mjs.map +0 -1
  157. package/tools/account/introspect-account.d.mts +0 -51
  158. package/tools/account/introspect-account.d.mts.map +0 -1
  159. package/tools/account/introspect-account.d.ts +0 -51
  160. package/tools/account/introspect-account.d.ts.map +0 -1
  161. package/tools/account/introspect-account.js +0 -51
  162. package/tools/account/introspect-account.js.map +0 -1
  163. package/tools/account/introspect-account.mjs +0 -44
  164. package/tools/account/introspect-account.mjs.map +0 -1
  165. package/tools/connect/sessions/new-connect-sessions.d.mts +0 -51
  166. package/tools/connect/sessions/new-connect-sessions.d.mts.map +0 -1
  167. package/tools/connect/sessions/new-connect-sessions.d.ts +0 -51
  168. package/tools/connect/sessions/new-connect-sessions.d.ts.map +0 -1
  169. package/tools/connect/sessions/new-connect-sessions.js +0 -114
  170. package/tools/connect/sessions/new-connect-sessions.js.map +0 -1
  171. package/tools/connect/sessions/new-connect-sessions.mjs +0 -107
  172. package/tools/connect/sessions/new-connect-sessions.mjs.map +0 -1
  173. package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts +0 -51
  174. package/tools/connect/sessions/reauthenticate-connect-sessions.d.mts.map +0 -1
  175. package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts +0 -51
  176. package/tools/connect/sessions/reauthenticate-connect-sessions.d.ts.map +0 -1
  177. package/tools/connect/sessions/reauthenticate-connect-sessions.js +0 -81
  178. package/tools/connect/sessions/reauthenticate-connect-sessions.js.map +0 -1
  179. package/tools/connect/sessions/reauthenticate-connect-sessions.mjs +0 -74
  180. package/tools/connect/sessions/reauthenticate-connect-sessions.mjs.map +0 -1
  181. package/tools/hris/benefits/create-hris-benefits.d.mts +0 -51
  182. package/tools/hris/benefits/create-hris-benefits.d.mts.map +0 -1
  183. package/tools/hris/benefits/create-hris-benefits.d.ts +0 -51
  184. package/tools/hris/benefits/create-hris-benefits.d.ts.map +0 -1
  185. package/tools/hris/benefits/create-hris-benefits.js +0 -128
  186. package/tools/hris/benefits/create-hris-benefits.js.map +0 -1
  187. package/tools/hris/benefits/create-hris-benefits.mjs +0 -121
  188. package/tools/hris/benefits/create-hris-benefits.mjs.map +0 -1
  189. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts +0 -51
  190. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.mts.map +0 -1
  191. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts +0 -51
  192. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.d.ts.map +0 -1
  193. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.js +0 -139
  194. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.js.map +0 -1
  195. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.mjs +0 -132
  196. package/tools/hris/benefits/individuals/enroll-many-benefits-hris-individuals.mjs.map +0 -1
  197. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts +0 -51
  198. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.mts.map +0 -1
  199. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts +0 -51
  200. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.d.ts.map +0 -1
  201. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js +0 -61
  202. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.js.map +0 -1
  203. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs +0 -54
  204. package/tools/hris/benefits/individuals/enrolled-ids-benefits-hris-individuals.mjs.map +0 -1
  205. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts +0 -51
  206. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.mts.map +0 -1
  207. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts +0 -51
  208. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.d.ts.map +0 -1
  209. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.js +0 -66
  210. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.js.map +0 -1
  211. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.mjs +0 -59
  212. package/tools/hris/benefits/individuals/retrieve-many-benefits-benefits-hris-individuals.mjs.map +0 -1
  213. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts +0 -51
  214. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.mts.map +0 -1
  215. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts +0 -51
  216. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.d.ts.map +0 -1
  217. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.js +0 -68
  218. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.js.map +0 -1
  219. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs +0 -61
  220. package/tools/hris/benefits/individuals/unenroll-many-benefits-hris-individuals.mjs.map +0 -1
  221. package/tools/hris/benefits/list-hris-benefits.d.mts +0 -51
  222. package/tools/hris/benefits/list-hris-benefits.d.mts.map +0 -1
  223. package/tools/hris/benefits/list-hris-benefits.d.ts +0 -51
  224. package/tools/hris/benefits/list-hris-benefits.d.ts.map +0 -1
  225. package/tools/hris/benefits/list-hris-benefits.js +0 -59
  226. package/tools/hris/benefits/list-hris-benefits.js.map +0 -1
  227. package/tools/hris/benefits/list-hris-benefits.mjs +0 -52
  228. package/tools/hris/benefits/list-hris-benefits.mjs.map +0 -1
  229. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts +0 -51
  230. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.mts.map +0 -1
  231. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts +0 -51
  232. package/tools/hris/benefits/list-supported-benefits-hris-benefits.d.ts.map +0 -1
  233. package/tools/hris/benefits/list-supported-benefits-hris-benefits.js +0 -59
  234. package/tools/hris/benefits/list-supported-benefits-hris-benefits.js.map +0 -1
  235. package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs +0 -52
  236. package/tools/hris/benefits/list-supported-benefits-hris-benefits.mjs.map +0 -1
  237. package/tools/hris/benefits/retrieve-hris-benefits.d.mts +0 -51
  238. package/tools/hris/benefits/retrieve-hris-benefits.d.mts.map +0 -1
  239. package/tools/hris/benefits/retrieve-hris-benefits.d.ts +0 -51
  240. package/tools/hris/benefits/retrieve-hris-benefits.d.ts.map +0 -1
  241. package/tools/hris/benefits/retrieve-hris-benefits.js +0 -61
  242. package/tools/hris/benefits/retrieve-hris-benefits.js.map +0 -1
  243. package/tools/hris/benefits/retrieve-hris-benefits.mjs +0 -54
  244. package/tools/hris/benefits/retrieve-hris-benefits.mjs.map +0 -1
  245. package/tools/hris/benefits/update-hris-benefits.d.mts +0 -51
  246. package/tools/hris/benefits/update-hris-benefits.d.mts.map +0 -1
  247. package/tools/hris/benefits/update-hris-benefits.d.ts +0 -51
  248. package/tools/hris/benefits/update-hris-benefits.d.ts.map +0 -1
  249. package/tools/hris/benefits/update-hris-benefits.js +0 -63
  250. package/tools/hris/benefits/update-hris-benefits.js.map +0 -1
  251. package/tools/hris/benefits/update-hris-benefits.mjs +0 -56
  252. package/tools/hris/benefits/update-hris-benefits.mjs.map +0 -1
  253. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts +0 -51
  254. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.mts.map +0 -1
  255. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts +0 -51
  256. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.d.ts.map +0 -1
  257. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js +0 -85
  258. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.js.map +0 -1
  259. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs +0 -78
  260. package/tools/hris/company/pay-statement-item/list-company-hris-pay-statement-item.mjs.map +0 -1
  261. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts +0 -51
  262. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.mts.map +0 -1
  263. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts +0 -51
  264. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.d.ts.map +0 -1
  265. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js +0 -103
  266. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.js.map +0 -1
  267. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs +0 -96
  268. package/tools/hris/company/pay-statement-item/rules/create-pay-statement-item-company-hris-rules.mjs.map +0 -1
  269. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts +0 -51
  270. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.mts.map +0 -1
  271. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts +0 -51
  272. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.d.ts.map +0 -1
  273. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js +0 -61
  274. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.js.map +0 -1
  275. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs +0 -54
  276. package/tools/hris/company/pay-statement-item/rules/delete-pay-statement-item-company-hris-rules.mjs.map +0 -1
  277. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts +0 -51
  278. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.mts.map +0 -1
  279. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts +0 -51
  280. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.d.ts.map +0 -1
  281. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js +0 -59
  282. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.js.map +0 -1
  283. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs +0 -52
  284. package/tools/hris/company/pay-statement-item/rules/list-pay-statement-item-company-hris-rules.mjs.map +0 -1
  285. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts +0 -51
  286. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.mts.map +0 -1
  287. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts +0 -51
  288. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.d.ts.map +0 -1
  289. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.js +0 -65
  290. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.js.map +0 -1
  291. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.mjs +0 -58
  292. package/tools/hris/company/pay-statement-item/rules/update-pay-statement-item-company-hris-rules.mjs.map +0 -1
  293. package/tools/hris/company/retrieve-hris-company.d.mts +0 -51
  294. package/tools/hris/company/retrieve-hris-company.d.mts.map +0 -1
  295. package/tools/hris/company/retrieve-hris-company.d.ts +0 -51
  296. package/tools/hris/company/retrieve-hris-company.d.ts.map +0 -1
  297. package/tools/hris/company/retrieve-hris-company.js +0 -58
  298. package/tools/hris/company/retrieve-hris-company.js.map +0 -1
  299. package/tools/hris/company/retrieve-hris-company.mjs +0 -51
  300. package/tools/hris/company/retrieve-hris-company.mjs.map +0 -1
  301. package/tools/hris/directory/list-hris-directory.d.mts +0 -51
  302. package/tools/hris/directory/list-hris-directory.d.mts.map +0 -1
  303. package/tools/hris/directory/list-hris-directory.d.ts +0 -51
  304. package/tools/hris/directory/list-hris-directory.d.ts.map +0 -1
  305. package/tools/hris/directory/list-hris-directory.js +0 -67
  306. package/tools/hris/directory/list-hris-directory.js.map +0 -1
  307. package/tools/hris/directory/list-hris-directory.mjs +0 -60
  308. package/tools/hris/directory/list-hris-directory.mjs.map +0 -1
  309. package/tools/hris/documents/list-hris-documents.d.mts +0 -51
  310. package/tools/hris/documents/list-hris-documents.d.mts.map +0 -1
  311. package/tools/hris/documents/list-hris-documents.d.ts +0 -51
  312. package/tools/hris/documents/list-hris-documents.d.ts.map +0 -1
  313. package/tools/hris/documents/list-hris-documents.js +0 -81
  314. package/tools/hris/documents/list-hris-documents.js.map +0 -1
  315. package/tools/hris/documents/list-hris-documents.mjs +0 -74
  316. package/tools/hris/documents/list-hris-documents.mjs.map +0 -1
  317. package/tools/hris/documents/retreive-hris-documents.d.mts +0 -51
  318. package/tools/hris/documents/retreive-hris-documents.d.mts.map +0 -1
  319. package/tools/hris/documents/retreive-hris-documents.d.ts +0 -51
  320. package/tools/hris/documents/retreive-hris-documents.d.ts.map +0 -1
  321. package/tools/hris/documents/retreive-hris-documents.js +0 -61
  322. package/tools/hris/documents/retreive-hris-documents.js.map +0 -1
  323. package/tools/hris/documents/retreive-hris-documents.mjs +0 -54
  324. package/tools/hris/documents/retreive-hris-documents.mjs.map +0 -1
  325. package/tools/hris/employments/retrieve-many-hris-employments.d.mts +0 -51
  326. package/tools/hris/employments/retrieve-many-hris-employments.d.mts.map +0 -1
  327. package/tools/hris/employments/retrieve-many-hris-employments.d.ts +0 -51
  328. package/tools/hris/employments/retrieve-many-hris-employments.d.ts.map +0 -1
  329. package/tools/hris/employments/retrieve-many-hris-employments.js +0 -65
  330. package/tools/hris/employments/retrieve-many-hris-employments.js.map +0 -1
  331. package/tools/hris/employments/retrieve-many-hris-employments.mjs +0 -58
  332. package/tools/hris/employments/retrieve-many-hris-employments.mjs.map +0 -1
  333. package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts +0 -51
  334. package/tools/hris/individuals/retrieve-many-hris-individuals.d.mts.map +0 -1
  335. package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts +0 -51
  336. package/tools/hris/individuals/retrieve-many-hris-individuals.d.ts.map +0 -1
  337. package/tools/hris/individuals/retrieve-many-hris-individuals.js +0 -79
  338. package/tools/hris/individuals/retrieve-many-hris-individuals.js.map +0 -1
  339. package/tools/hris/individuals/retrieve-many-hris-individuals.mjs +0 -72
  340. package/tools/hris/individuals/retrieve-many-hris-individuals.mjs.map +0 -1
  341. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts +0 -51
  342. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.mts.map +0 -1
  343. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts +0 -51
  344. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.d.ts.map +0 -1
  345. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js +0 -73
  346. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.js.map +0 -1
  347. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs +0 -66
  348. package/tools/hris/pay-statements/retrieve-many-hris-pay-statements.mjs.map +0 -1
  349. package/tools/hris/payments/list-hris-payments.d.mts +0 -51
  350. package/tools/hris/payments/list-hris-payments.d.mts.map +0 -1
  351. package/tools/hris/payments/list-hris-payments.d.ts +0 -51
  352. package/tools/hris/payments/list-hris-payments.d.ts.map +0 -1
  353. package/tools/hris/payments/list-hris-payments.js +0 -69
  354. package/tools/hris/payments/list-hris-payments.js.map +0 -1
  355. package/tools/hris/payments/list-hris-payments.mjs +0 -62
  356. package/tools/hris/payments/list-hris-payments.mjs.map +0 -1
  357. package/tools/index.d.mts +0 -10
  358. package/tools/index.d.mts.map +0 -1
  359. package/tools/index.d.ts +0 -10
  360. package/tools/index.d.ts.map +0 -1
  361. package/tools/index.js +0 -145
  362. package/tools/index.js.map +0 -1
  363. package/tools/index.mjs +0 -138
  364. package/tools/index.mjs.map +0 -1
  365. package/tools/jobs/automated/create-jobs-automated.d.mts +0 -51
  366. package/tools/jobs/automated/create-jobs-automated.d.mts.map +0 -1
  367. package/tools/jobs/automated/create-jobs-automated.d.ts +0 -51
  368. package/tools/jobs/automated/create-jobs-automated.d.ts.map +0 -1
  369. package/tools/jobs/automated/create-jobs-automated.js +0 -82
  370. package/tools/jobs/automated/create-jobs-automated.js.map +0 -1
  371. package/tools/jobs/automated/create-jobs-automated.mjs +0 -75
  372. package/tools/jobs/automated/create-jobs-automated.mjs.map +0 -1
  373. package/tools/jobs/automated/list-jobs-automated.d.mts +0 -51
  374. package/tools/jobs/automated/list-jobs-automated.d.mts.map +0 -1
  375. package/tools/jobs/automated/list-jobs-automated.d.ts +0 -51
  376. package/tools/jobs/automated/list-jobs-automated.d.ts.map +0 -1
  377. package/tools/jobs/automated/list-jobs-automated.js +0 -59
  378. package/tools/jobs/automated/list-jobs-automated.js.map +0 -1
  379. package/tools/jobs/automated/list-jobs-automated.mjs +0 -52
  380. package/tools/jobs/automated/list-jobs-automated.mjs.map +0 -1
  381. package/tools/jobs/automated/retrieve-jobs-automated.d.mts +0 -51
  382. package/tools/jobs/automated/retrieve-jobs-automated.d.mts.map +0 -1
  383. package/tools/jobs/automated/retrieve-jobs-automated.d.ts +0 -51
  384. package/tools/jobs/automated/retrieve-jobs-automated.d.ts.map +0 -1
  385. package/tools/jobs/automated/retrieve-jobs-automated.js +0 -54
  386. package/tools/jobs/automated/retrieve-jobs-automated.js.map +0 -1
  387. package/tools/jobs/automated/retrieve-jobs-automated.mjs +0 -47
  388. package/tools/jobs/automated/retrieve-jobs-automated.mjs.map +0 -1
  389. package/tools/jobs/manual/retrieve-jobs-manual.d.mts +0 -51
  390. package/tools/jobs/manual/retrieve-jobs-manual.d.mts.map +0 -1
  391. package/tools/jobs/manual/retrieve-jobs-manual.d.ts +0 -51
  392. package/tools/jobs/manual/retrieve-jobs-manual.d.ts.map +0 -1
  393. package/tools/jobs/manual/retrieve-jobs-manual.js +0 -54
  394. package/tools/jobs/manual/retrieve-jobs-manual.js.map +0 -1
  395. package/tools/jobs/manual/retrieve-jobs-manual.mjs +0 -47
  396. package/tools/jobs/manual/retrieve-jobs-manual.mjs.map +0 -1
  397. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts +0 -51
  398. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.mts.map +0 -1
  399. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts +0 -51
  400. package/tools/payroll/pay-groups/list-payroll-pay-groups.d.ts.map +0 -1
  401. package/tools/payroll/pay-groups/list-payroll-pay-groups.js +0 -68
  402. package/tools/payroll/pay-groups/list-payroll-pay-groups.js.map +0 -1
  403. package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs +0 -61
  404. package/tools/payroll/pay-groups/list-payroll-pay-groups.mjs.map +0 -1
  405. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts +0 -51
  406. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.mts.map +0 -1
  407. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts +0 -51
  408. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.d.ts.map +0 -1
  409. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js +0 -61
  410. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.js.map +0 -1
  411. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs +0 -54
  412. package/tools/payroll/pay-groups/retrieve-payroll-pay-groups.mjs.map +0 -1
  413. package/tools/providers/list-providers.d.mts +0 -51
  414. package/tools/providers/list-providers.d.mts.map +0 -1
  415. package/tools/providers/list-providers.d.ts +0 -51
  416. package/tools/providers/list-providers.d.ts.map +0 -1
  417. package/tools/providers/list-providers.js +0 -52
  418. package/tools/providers/list-providers.js.map +0 -1
  419. package/tools/providers/list-providers.mjs +0 -45
  420. package/tools/providers/list-providers.mjs.map +0 -1
  421. package/tools/request-forwarding/forward-request-forwarding.d.mts +0 -51
  422. package/tools/request-forwarding/forward-request-forwarding.d.mts.map +0 -1
  423. package/tools/request-forwarding/forward-request-forwarding.d.ts +0 -51
  424. package/tools/request-forwarding/forward-request-forwarding.d.ts.map +0 -1
  425. package/tools/request-forwarding/forward-request-forwarding.js +0 -71
  426. package/tools/request-forwarding/forward-request-forwarding.js.map +0 -1
  427. package/tools/request-forwarding/forward-request-forwarding.mjs +0 -64
  428. package/tools/request-forwarding/forward-request-forwarding.mjs.map +0 -1
  429. package/tools/sandbox/company/update-sandbox-company.d.mts +0 -51
  430. package/tools/sandbox/company/update-sandbox-company.d.mts.map +0 -1
  431. package/tools/sandbox/company/update-sandbox-company.d.ts +0 -51
  432. package/tools/sandbox/company/update-sandbox-company.d.ts.map +0 -1
  433. package/tools/sandbox/company/update-sandbox-company.js +0 -190
  434. package/tools/sandbox/company/update-sandbox-company.js.map +0 -1
  435. package/tools/sandbox/company/update-sandbox-company.mjs +0 -183
  436. package/tools/sandbox/company/update-sandbox-company.mjs.map +0 -1
  437. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts +0 -51
  438. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.mts.map +0 -1
  439. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts +0 -51
  440. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.d.ts.map +0 -1
  441. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js +0 -68
  442. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.js.map +0 -1
  443. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs +0 -61
  444. package/tools/sandbox/connections/accounts/create-connections-sandbox-accounts.mjs.map +0 -1
  445. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts +0 -51
  446. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.mts.map +0 -1
  447. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts +0 -51
  448. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.d.ts.map +0 -1
  449. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js +0 -60
  450. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.js.map +0 -1
  451. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs +0 -53
  452. package/tools/sandbox/connections/accounts/update-connections-sandbox-accounts.mjs.map +0 -1
  453. package/tools/sandbox/connections/create-sandbox-connections.d.mts +0 -51
  454. package/tools/sandbox/connections/create-sandbox-connections.d.mts.map +0 -1
  455. package/tools/sandbox/connections/create-sandbox-connections.d.ts +0 -51
  456. package/tools/sandbox/connections/create-sandbox-connections.d.ts.map +0 -1
  457. package/tools/sandbox/connections/create-sandbox-connections.js +0 -68
  458. package/tools/sandbox/connections/create-sandbox-connections.js.map +0 -1
  459. package/tools/sandbox/connections/create-sandbox-connections.mjs +0 -61
  460. package/tools/sandbox/connections/create-sandbox-connections.mjs.map +0 -1
  461. package/tools/sandbox/directory/create-sandbox-directory.d.mts +0 -51
  462. package/tools/sandbox/directory/create-sandbox-directory.d.mts.map +0 -1
  463. package/tools/sandbox/directory/create-sandbox-directory.d.ts +0 -51
  464. package/tools/sandbox/directory/create-sandbox-directory.d.ts.map +0 -1
  465. package/tools/sandbox/directory/create-sandbox-directory.js +0 -311
  466. package/tools/sandbox/directory/create-sandbox-directory.js.map +0 -1
  467. package/tools/sandbox/directory/create-sandbox-directory.mjs +0 -304
  468. package/tools/sandbox/directory/create-sandbox-directory.mjs.map +0 -1
  469. package/tools/sandbox/employment/update-sandbox-employment.d.mts +0 -51
  470. package/tools/sandbox/employment/update-sandbox-employment.d.mts.map +0 -1
  471. package/tools/sandbox/employment/update-sandbox-employment.d.ts +0 -51
  472. package/tools/sandbox/employment/update-sandbox-employment.d.ts.map +0 -1
  473. package/tools/sandbox/employment/update-sandbox-employment.js +0 -233
  474. package/tools/sandbox/employment/update-sandbox-employment.js.map +0 -1
  475. package/tools/sandbox/employment/update-sandbox-employment.mjs +0 -226
  476. package/tools/sandbox/employment/update-sandbox-employment.mjs.map +0 -1
  477. package/tools/sandbox/individual/update-sandbox-individual.d.mts +0 -51
  478. package/tools/sandbox/individual/update-sandbox-individual.d.mts.map +0 -1
  479. package/tools/sandbox/individual/update-sandbox-individual.d.ts +0 -51
  480. package/tools/sandbox/individual/update-sandbox-individual.d.ts.map +0 -1
  481. package/tools/sandbox/individual/update-sandbox-individual.js +0 -173
  482. package/tools/sandbox/individual/update-sandbox-individual.js.map +0 -1
  483. package/tools/sandbox/individual/update-sandbox-individual.mjs +0 -166
  484. package/tools/sandbox/individual/update-sandbox-individual.mjs.map +0 -1
  485. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts +0 -51
  486. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.mts.map +0 -1
  487. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts +0 -51
  488. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.d.ts.map +0 -1
  489. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js +0 -51
  490. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.js.map +0 -1
  491. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs +0 -44
  492. package/tools/sandbox/jobs/configuration/retrieve-jobs-sandbox-configuration.mjs.map +0 -1
  493. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts +0 -51
  494. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.mts.map +0 -1
  495. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts +0 -51
  496. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.d.ts.map +0 -1
  497. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js +0 -59
  498. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.js.map +0 -1
  499. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs +0 -52
  500. package/tools/sandbox/jobs/configuration/update-jobs-sandbox-configuration.mjs.map +0 -1
  501. package/tools/sandbox/jobs/create-sandbox-jobs.d.mts +0 -51
  502. package/tools/sandbox/jobs/create-sandbox-jobs.d.mts.map +0 -1
  503. package/tools/sandbox/jobs/create-sandbox-jobs.d.ts +0 -51
  504. package/tools/sandbox/jobs/create-sandbox-jobs.d.ts.map +0 -1
  505. package/tools/sandbox/jobs/create-sandbox-jobs.js +0 -54
  506. package/tools/sandbox/jobs/create-sandbox-jobs.js.map +0 -1
  507. package/tools/sandbox/jobs/create-sandbox-jobs.mjs +0 -47
  508. package/tools/sandbox/jobs/create-sandbox-jobs.mjs.map +0 -1
  509. package/tools/sandbox/payment/create-sandbox-payment.d.mts +0 -51
  510. package/tools/sandbox/payment/create-sandbox-payment.d.mts.map +0 -1
  511. package/tools/sandbox/payment/create-sandbox-payment.d.ts +0 -51
  512. package/tools/sandbox/payment/create-sandbox-payment.d.ts.map +0 -1
  513. package/tools/sandbox/payment/create-sandbox-payment.js +0 -224
  514. package/tools/sandbox/payment/create-sandbox-payment.js.map +0 -1
  515. package/tools/sandbox/payment/create-sandbox-payment.mjs +0 -217
  516. package/tools/sandbox/payment/create-sandbox-payment.mjs.map +0 -1
  517. package/tools/types.d.mts.map +0 -1
  518. package/tools/types.d.ts.map +0 -1
  519. package/tools/types.js.map +0 -1
  520. package/tools/types.mjs.map +0 -1
  521. package/tools.d.mts +0 -2
  522. package/tools.d.mts.map +0 -1
  523. package/tools.d.ts +0 -2
  524. package/tools.d.ts.map +0 -1
  525. package/tools.js +0 -18
  526. package/tools.js.map +0 -1
  527. package/tools.mjs +0 -2
  528. package/tools.mjs.map +0 -1
  529. /package/{tools/types.js → types.js} +0 -0
  530. /package/{tools/types.mjs → types.mjs} +0 -0
@@ -1,153 +0,0 @@
1
- import Finch from '@tryfinch/finch-api';
2
- import { Endpoint, asTextContentResult, ToolCallResult } from './tools/types';
3
- import { zodToJsonSchema } from 'zod-to-json-schema';
4
- import { z } from 'zod';
5
- import { Cabidela } from '@cloudflare/cabidela';
6
-
7
- function zodToInputSchema(schema: z.ZodSchema) {
8
- return {
9
- type: 'object' as const,
10
- ...(zodToJsonSchema(schema) as any),
11
- };
12
- }
13
-
14
- /**
15
- * A list of tools that expose all the endpoints in the API dynamically.
16
- *
17
- * Instead of exposing every endpoint as its own tool, which uses up too many tokens for LLMs to use at once,
18
- * we expose a single tool that can be used to search for endpoints by name, resource, operation, or tag, and then
19
- * a generic endpoint that can be used to invoke any endpoint with the provided arguments.
20
- *
21
- * @param endpoints - The endpoints to include in the list.
22
- */
23
- export function dynamicTools(endpoints: Endpoint[]): Endpoint[] {
24
- const listEndpointsSchema = z.object({
25
- search_query: z
26
- .string()
27
- .optional()
28
- .describe(
29
- 'An optional search query to filter the endpoints by. Provide a partial name, resource, operation, or tag to filter the endpoints returned.',
30
- ),
31
- });
32
-
33
- const listEndpointsTool = {
34
- metadata: {
35
- resource: 'dynamic_tools',
36
- operation: 'read' as const,
37
- tags: [],
38
- },
39
- tool: {
40
- name: 'list_api_endpoints',
41
- description: 'List or search for all endpoints in the Finch TypeScript API',
42
- inputSchema: zodToInputSchema(listEndpointsSchema),
43
- },
44
- handler: async (client: Finch, args: Record<string, unknown> | undefined): Promise<ToolCallResult> => {
45
- const query = args && listEndpointsSchema.parse(args).search_query?.trim();
46
-
47
- const filteredEndpoints =
48
- query && query.length > 0 ?
49
- endpoints.filter((endpoint) => {
50
- const fieldsToMatch = [
51
- endpoint.tool.name,
52
- endpoint.tool.description,
53
- endpoint.metadata.resource,
54
- endpoint.metadata.operation,
55
- ...endpoint.metadata.tags,
56
- ];
57
- return fieldsToMatch.some((field) => field && field.toLowerCase().includes(query.toLowerCase()));
58
- })
59
- : endpoints;
60
-
61
- return asTextContentResult({
62
- tools: filteredEndpoints.map(({ tool, metadata }) => ({
63
- name: tool.name,
64
- description: tool.description,
65
- resource: metadata.resource,
66
- operation: metadata.operation,
67
- tags: metadata.tags,
68
- })),
69
- });
70
- },
71
- };
72
-
73
- const getEndpointSchema = z.object({
74
- endpoint: z.string().describe('The name of the endpoint to get the schema for.'),
75
- });
76
- const getEndpointTool = {
77
- metadata: {
78
- resource: 'dynamic_tools',
79
- operation: 'read' as const,
80
- tags: [],
81
- },
82
- tool: {
83
- name: 'get_api_endpoint_schema',
84
- description:
85
- 'Get the schema for an endpoint in the Finch TypeScript API. You can use the schema returned by this tool to invoke an endpoint with the `invoke_api_endpoint` tool.',
86
- inputSchema: zodToInputSchema(getEndpointSchema),
87
- },
88
- handler: async (client: Finch, args: Record<string, unknown> | undefined) => {
89
- if (!args) {
90
- throw new Error('No endpoint provided');
91
- }
92
- const endpointName = getEndpointSchema.parse(args).endpoint;
93
-
94
- const endpoint = endpoints.find((e) => e.tool.name === endpointName);
95
- if (!endpoint) {
96
- throw new Error(`Endpoint ${endpointName} not found`);
97
- }
98
- return asTextContentResult(endpoint.tool);
99
- },
100
- };
101
-
102
- const invokeEndpointSchema = z.object({
103
- endpoint_name: z.string().describe('The name of the endpoint to invoke.'),
104
- args: z
105
- .record(z.string(), z.any())
106
- .describe(
107
- 'The arguments to pass to the endpoint. This must match the schema returned by the `get_api_endpoint_schema` tool.',
108
- ),
109
- });
110
-
111
- const invokeEndpointTool = {
112
- metadata: {
113
- resource: 'dynamic_tools',
114
- operation: 'write' as const,
115
- tags: [],
116
- },
117
- tool: {
118
- name: 'invoke_api_endpoint',
119
- description:
120
- 'Invoke an endpoint in the Finch TypeScript API. Note: use the `list_api_endpoints` tool to get the list of endpoints and `get_api_endpoint_schema` tool to get the schema for an endpoint.',
121
- inputSchema: zodToInputSchema(invokeEndpointSchema),
122
- },
123
- handler: async (client: Finch, args: Record<string, unknown> | undefined): Promise<ToolCallResult> => {
124
- if (!args) {
125
- throw new Error('No endpoint provided');
126
- }
127
- const { success, data, error } = invokeEndpointSchema.safeParse(args);
128
- if (!success) {
129
- throw new Error(`Invalid arguments for endpoint. ${error?.format()}`);
130
- }
131
- const { endpoint_name, args: endpointArgs } = data;
132
-
133
- const endpoint = endpoints.find((e) => e.tool.name === endpoint_name);
134
- if (!endpoint) {
135
- throw new Error(
136
- `Endpoint ${endpoint_name} not found. Use the \`list_api_endpoints\` tool to get the list of available endpoints.`,
137
- );
138
- }
139
-
140
- try {
141
- // Try to validate the arguments for a better error message
142
- const cabidela = new Cabidela(endpoint.tool.inputSchema, { fullErrors: true });
143
- cabidela.validate(endpointArgs);
144
- } catch (error) {
145
- throw new Error(`Invalid arguments for endpoint ${endpoint_name}:\n${error}`);
146
- }
147
-
148
- return await endpoint.handler(client, endpointArgs);
149
- },
150
- };
151
-
152
- return [getEndpointTool, listEndpointsTool, invokeEndpointTool];
153
- }
package/src/filtering.ts DELETED
@@ -1,18 +0,0 @@
1
- // @ts-nocheck
2
- import initJq from 'jq-web';
3
-
4
- export async function maybeFilter(jqFilter: unknown | undefined, response: any): Promise<any> {
5
- if (jqFilter && typeof jqFilter === 'string') {
6
- return await jq(response, jqFilter);
7
- } else {
8
- return response;
9
- }
10
- }
11
-
12
- async function jq(json: any, jqFilter: string) {
13
- return (await initJq).json(json, jqFilter);
14
- }
15
-
16
- export function isJqError(error: any): error is Error {
17
- return error instanceof Error && 'stderr' in error;
18
- }
@@ -1,65 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Finch from '@tryfinch/finch-api';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'access_tokens',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'post',
14
- httpPath: '/auth/token',
15
- operationId: 'create-access-token',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'create_access_tokens',
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\nExchange the authorization code for an access token\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/create_access_token_response',\n $defs: {\n create_access_token_response: {\n type: 'object',\n properties: {\n access_token: {\n type: 'string',\n description: 'The access token for the connection'\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_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 entity_ids: {\n type: 'array',\n description: 'An array of entity IDs that can be accessed with this access token',\n items: {\n type: 'string'\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 token_type: {\n type: 'string',\n description: 'The RFC 8693 token type (Finch uses `bearer` tokens)'\n },\n account_id: {\n type: 'string',\n description: '[DEPRECATED] Use `connection_id` to identify the connection instead of this account ID'\n },\n company_id: {\n type: 'string',\n description: '[DEPRECATED] Use `connection_id` to identify the connection instead of this company ID'\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 },\n required: [ 'access_token',\n 'client_type',\n 'connection_id',\n 'connection_type',\n 'entity_ids',\n 'products',\n 'provider_id',\n 'token_type'\n ]\n }\n }\n}\n```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- code: {
26
- type: 'string',
27
- description: 'The authorization code received from the authorization server',
28
- },
29
- client_id: {
30
- type: 'string',
31
- description: 'The client ID for your application',
32
- },
33
- client_secret: {
34
- type: 'string',
35
- description: 'The client secret for your application',
36
- },
37
- redirect_uri: {
38
- type: 'string',
39
- description: 'The redirect URI used in the authorization request (optional)',
40
- },
41
- jq_filter: {
42
- type: 'string',
43
- title: 'jq Filter',
44
- description:
45
- '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/).',
46
- },
47
- },
48
- required: ['code'],
49
- },
50
- annotations: {},
51
- };
52
-
53
- export const handler = async (client: Finch, args: Record<string, unknown> | undefined) => {
54
- const { jq_filter, ...body } = args as any;
55
- try {
56
- return asTextContentResult(await maybeFilter(jq_filter, await client.accessTokens.create(body)));
57
- } catch (error) {
58
- if (error instanceof Finch.APIError || isJqError(error)) {
59
- return asErrorResult(error.message);
60
- }
61
- throw error;
62
- }
63
- };
64
-
65
- export default { metadata, tool, handler };
@@ -1,49 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Finch from '@tryfinch/finch-api';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'account',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'post',
14
- httpPath: '/disconnect',
15
- operationId: 'post-disconnect',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'disconnect_account',
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```",
22
- inputSchema: {
23
- type: 'object',
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
- };
36
-
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
- }
47
- };
48
-
49
- export default { metadata, tool, handler };
@@ -1,51 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Finch from '@tryfinch/finch-api';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'account',
11
- operation: 'read',
12
- tags: [],
13
- httpMethod: 'get',
14
- httpPath: '/introspect',
15
- operationId: 'get-introspect',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'introspect_account',
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```",
22
- inputSchema: {
23
- type: 'object',
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,
36
- },
37
- };
38
-
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
- }
49
- };
50
-
51
- export default { metadata, tool, handler };
@@ -1,115 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Finch from '@tryfinch/finch-api';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'connect.sessions',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'post',
14
- httpPath: '/connect/sessions',
15
- operationId: 'post-connect-sessions',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'new_connect_sessions',
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```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- customer_id: {
26
- type: 'string',
27
- description: 'Unique identifier for the customer',
28
- },
29
- customer_name: {
30
- type: 'string',
31
- description: 'Name of the customer',
32
- },
33
- products: {
34
- type: 'array',
35
- description: 'The Finch products to request access to',
36
- items: {
37
- type: 'string',
38
- description: 'The Finch products that can be requested during the Connect flow.',
39
- enum: [
40
- 'benefits',
41
- 'company',
42
- 'deduction',
43
- 'directory',
44
- 'documents',
45
- 'employment',
46
- 'individual',
47
- 'payment',
48
- 'pay_statement',
49
- 'ssn',
50
- ],
51
- },
52
- },
53
- customer_email: {
54
- type: 'string',
55
- description: 'Email address of the customer',
56
- },
57
- integration: {
58
- type: 'object',
59
- description: 'Integration configuration for the connect session',
60
- properties: {
61
- provider: {
62
- type: 'string',
63
- description: 'The provider to integrate with',
64
- },
65
- auth_method: {
66
- type: 'string',
67
- description: 'The authentication method to use',
68
- enum: ['assisted', 'credential', 'oauth', 'api_token'],
69
- },
70
- },
71
- required: ['provider'],
72
- },
73
- manual: {
74
- type: 'boolean',
75
- description: 'Enable manual authentication mode',
76
- },
77
- minutes_to_expire: {
78
- type: 'number',
79
- description:
80
- 'The number of minutes until the session expires (defaults to 129,600, which is 90 days)',
81
- },
82
- redirect_uri: {
83
- type: 'string',
84
- description: 'The URI to redirect to after the Connect flow is completed',
85
- },
86
- sandbox: {
87
- type: 'string',
88
- description: 'Sandbox mode for testing',
89
- enum: ['finch', 'provider'],
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
- },
97
- },
98
- required: ['customer_id', 'customer_name', 'products'],
99
- },
100
- annotations: {},
101
- };
102
-
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
- }
113
- };
114
-
115
- export default { metadata, tool, handler };
@@ -1,83 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { isJqError, maybeFilter } from '@tryfinch/finch-api-mcp/filtering';
4
- import { Metadata, asErrorResult, asTextContentResult } from '@tryfinch/finch-api-mcp/tools/types';
5
-
6
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
- import Finch from '@tryfinch/finch-api';
8
-
9
- export const metadata: Metadata = {
10
- resource: 'connect.sessions',
11
- operation: 'write',
12
- tags: [],
13
- httpMethod: 'post',
14
- httpPath: '/connect/sessions/reauthenticate',
15
- operationId: 'post-connect-sessions-reauthenticate',
16
- };
17
-
18
- export const tool: Tool = {
19
- name: 'reauthenticate_connect_sessions',
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```",
22
- inputSchema: {
23
- type: 'object',
24
- properties: {
25
- connection_id: {
26
- type: 'string',
27
- description: 'The ID of the existing connection to reauthenticate',
28
- },
29
- minutes_to_expire: {
30
- type: 'integer',
31
- description: 'The number of minutes until the session expires (defaults to 43,200, which is 30 days)',
32
- },
33
- products: {
34
- type: 'array',
35
- description: 'The products to request access to (optional for reauthentication)',
36
- items: {
37
- type: 'string',
38
- description: 'The Finch products that can be requested during the Connect flow.',
39
- enum: [
40
- 'benefits',
41
- 'company',
42
- 'deduction',
43
- 'directory',
44
- 'documents',
45
- 'employment',
46
- 'individual',
47
- 'payment',
48
- 'pay_statement',
49
- 'ssn',
50
- ],
51
- },
52
- },
53
- redirect_uri: {
54
- type: 'string',
55
- description: 'The URI to redirect to after the Connect flow is completed',
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
- },
63
- },
64
- required: ['connection_id'],
65
- },
66
- annotations: {},
67
- };
68
-
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
- }
81
- };
82
-
83
- export default { metadata, tool, handler };