Guides
Import / Export
How to import and export ToolSets as ZIP files
Overview
Export and import ToolSets as ZIP files. Convenient for developing with local editors and importing via ZIP.
ZIP File Structure
my-toolset/
├── toolset.yml
└── tools/
├── tool-a/
│ ├── tool.yml
│ └── main.py
└── tool-b/
├── tool.yml
└── main.pyFile Formats
toolset.yml
name: My ToolSet
description: ToolSet description
language: python # python or typescript
packages:
- name: requests
version: "2.31.0"
- name: beautifulsoup4
env:
- key: API_KEY
secret: true # Value excluded on export
- key: LOG_LEVEL
value: debug| Field | Description |
|---|---|
name | Display name (required) |
language | python or typescript (required) |
packages | Packages to install |
env | Environment variables. secret: true exports key only |
Slug is determined from the directory name.
tool.yml
name: My Tool
description: Tool descriptionSlug is determined from the directory name.
Code File
Write code in main.py (Python) or main.ts (TypeScript).
from pydantic import BaseModel
class Input(BaseModel):
query: str
class Output(BaseModel):
result: str
def run(input: Input) -> Output:
return Output(result=input.query.upper())Input/Output schemas are automatically extracted on import.
Operations
Export
Click the "Export" button on the ToolSet screen to download {slug}.zip.
Import
- Click the "Import" button on the ToolSet screen
- Select a ZIP file
- Execute "Import"
Enable "Overwrite existing tools" to overwrite tools with the same slug.
Errors
| Error | Cause |
|---|---|
Invalid ZIP: no root directory found | toolset.yml not found |
name and language are required | Required fields missing in toolset.yml |
tool.yml not found for tool | Tool missing tool.yml |
main.{ext} not found for tool | Tool missing code file |