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
- Navigate to Tools and click Create Tool
- Select SDK as the execution method
- Enter the npm package name and version (e.g.
stripeat^17.0.0) - Click Discover — almyty installs the package in a sandbox, introspects its exports, and lists the available functions with their signatures
- Select which functions you want to generate tools from (or select all)
- Review the auto-generated name, description, and parameter schema for each tool — edit any that need refinement
- Click Create to generate the tools
How discovery works
When you click Discover, almyty:
- Installs the package (and its dependencies) in an isolated environment
- Loads the module and enumerates its named exports and default export
- For each exported function or class method, infers a parameter schema from TypeScript types (if the package ships
.d.tsfiles) or from JSDoc annotations - 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:
| Package | Use case |
|---|---|
stripe | Payment processing |
@aws-sdk/client-s3 | S3 file operations |
@sendgrid/mail | Transactional email |
pg | PostgreSQL queries |
openai | OpenAI API calls |
lodash | Data transformation utilities |
cheerio | HTML parsing and scraping |
csv-parse | CSV file processing |
Limitations
- Packages that require native
.nodeaddons 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
objectparameter 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