Skip to Content
almyty docs — v1
ToolsSDK Tools

SDK Tools

SDK tools let you import an npm package and auto-generate tools from its exported functions. Point almyty at a package like stripe, @aws-sdk/client-s3, or lodash, and it discovers the public API, infers parameter schemas, and creates callable tools — no manual wiring required.

In the UI

  1. Navigate to Tools and click Create Tool
  2. Select SDK as the execution method
  3. Enter the npm package name and version (e.g. stripe at ^17.0.0)
  4. Click Discover — almyty installs the package in a sandbox, introspects its exports, and lists the available functions with their signatures
  5. Select which functions you want to generate tools from (or select all)
  6. Review the auto-generated name, description, and parameter schema for each tool — edit any that need refinement
  7. Click Create to generate the tools

How discovery works

When you click Discover, almyty:

  1. Installs the package (and its dependencies) in an isolated environment
  2. Loads the module and enumerates its named exports and default export
  3. For each exported function or class method, infers a parameter schema from TypeScript types (if the package ships .d.ts files) or from JSDoc annotations
  4. Presents the discovered functions in a table with name, description (from JSDoc or TS docs), and the inferred input schema

You can filter the list, deselect functions you don’t need, and edit parameter descriptions before creating the tools.

What gets created

Each selected function becomes a JavaScript tool under the hood. The generated code:

  • require()s the package
  • Calls the selected function with the input parameters
  • Returns the result

The tools run in the same hardened sandbox as all JavaScript tools, with the same filesystem isolation, SSRF guard, and resource limits.

Via the API

Discover package exports

curl -X POST /organizations/{orgId}/tools/sdk/discover \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "package": "stripe", "version": "^17.0.0" }'

Response:

{ "package": "stripe", "version": "17.4.0", "exports": [ { "name": "Stripe", "type": "class", "methods": [ { "name": "customers.create", "description": "Creates a new customer object", "parameters": { "type": "object", "properties": { "email": { "type": "string", "description": "Customer email" }, "name": { "type": "string", "description": "Customer name" }, "metadata": { "type": "object", "description": "Arbitrary metadata" } } } } ] } ] }

Generate tools from discovered exports

curl -X POST /organizations/{orgId}/tools/sdk/generate \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "package": "stripe", "version": "^17.0.0", "functions": ["customers.create", "customers.retrieve", "charges.create"], "credentialId": "credential-uuid" }'

Response:

{ "created": [ { "id": "tool-uuid-1", "name": "stripe_customers_create", "type": "javascript" }, { "id": "tool-uuid-2", "name": "stripe_customers_retrieve", "type": "javascript" }, { "id": "tool-uuid-3", "name": "stripe_charges_create", "type": "javascript" } ] }

Credentials

Many SDK packages require API keys or secrets. Link a credential from the vault when generating tools — the credential values are passed to your tools via the credentials closure argument at execution time, never hardcoded into the generated code.

Supported packages

Any npm package that can be installed in a Node.js environment works. Common examples:

PackageUse case
stripePayment processing
@aws-sdk/client-s3S3 file operations
@sendgrid/mailTransactional email
pgPostgreSQL queries
openaiOpenAI API calls
lodashData transformation utilities
cheerioHTML parsing and scraping
csv-parseCSV file processing

Limitations

  • Packages that require native .node addons are not supported (the sandbox blocks native addon loading)
  • Discovery relies on TypeScript declarations or JSDoc — packages with no type information produce tools with generic object parameter schemas that you will need to refine manually
  • Class-based packages (like stripe) require constructor arguments (API keys, config) — these are wired through credentials, not parameters