Skip to Content
Examplesnpm package as tools

πŸ“¦ Turn an npm package into tools

Stack β€” Tools: any npm package (stripe, @aws-sdk, octokit) Β· Execution: SDK (sandboxed) Β· Secrets: Credentials vault Β· Output: typed tools, no wrappers

Who it’s for β€” anyone who wants an agent to use a library β€” Stripe, AWS, GitHub β€” without hand-writing a tool per function. What it does β€” points almyty at an npm package, introspects its exports, and turns the functions you pick into typed tools that run in a hardened sandbox. Re-run discovery when the SDK updates and the parameters follow β€” no schema drift.

Build it

  1. Add the package as an SDK tool. Tools β†’ Create Tool, choose SDK, enter the package and version (stripe at ^17.0.0), and click Discover: almyty installs it in a sandbox and infers a parameter schema for each function from the package’s own TypeScript types.
  2. Keep the functions you want. Select the ones you need β€” charges.create, refunds.create, customers.retrieve β€” review the generated names and parameters, and create them. Each is a JavaScript tool that require()s the package.
  3. Give it its secret. Store the API key in the Credentials vault and reference it from the tool β€” injected at run time, never in a prompt.
  4. Attach and use. Add the tools to an agent or publish them on a gateway; the agent calls refunds.create like any other tool.

Your new tools, ready to attach or publish

Make it yours

  • Works for @aws-sdk/client-s3, @octokit/rest, lodash, or any package on npm.
  • Combine with a connected API on the same gateway.
  • Re-run Discover after an SDK bump to refresh parameters.

Uses β€” Platform Β· SDK tools Β· Integrations