Overview
The@jinba-toolbox/sdk package provides a type-safe client library for consuming tools registered in Jinba Toolbox. It wraps the REST API with convenient methods for listing toolsets, executing tools, managing versions, and retrieving run history.
Target consumers:
- AI agents executing tools
- CLI tools for automation
- Third-party applications integrating with Jinba Toolbox
- Developers building on Jinba Toolbox
Installation
Quick Start
1
Import and create a client
2
List your toolsets
3
Execute a tool
Client Configuration
ThecreateClient function accepts a JinbaTBClientConfig object:
organizationId in the constructor, you can omit it from individual method calls. Every method also accepts an optional orgId parameter to override the default.
API Reference
Organizations
ToolSets
Tools
Execution
Versions
Run History
Key Types
RunResult
The object returned fromrun() and test():
ToolSet
Tool
Error Handling
The SDK throwsJinbaTBError for non-2xx responses:
Best Practices
- Set a default
organizationIdin the constructor to avoid passing it to every method. - Use environment variables for the API key — never hard-code credentials.
- Handle
JinbaTBErrorto distinguish between client errors (4xx) and server errors (5xx). - Increase
timeoutfor tool executions that run complex sandbox workloads. - Pin a version when calling
run()if your application depends on deterministic behavior.
Related
- REST API — Full endpoint reference
- MCP Integration — Use toolsets as MCP servers for AI agents
- Versioning & Publishing — Understand the version lifecycle