Tool Editor
The Tool Editor is where you define the logic and interface for your AI tools.
Basic Configuration
- Name: A human-readable name for your tool (e.g., "Get Weather").
- Description: Crucial for AI models. This tells the AI when to use this tool. Be specific (e.g., "Retrieves current weather data for a given city").
- Language: Choose between TypeScript (recommended for type safety) or JavaScript.
- Runtime: Select Node.js or Deno. See the Runtimes Guide for a comparison.
Source Code
Write your function here. It must export default an async function.
export default async function(input) {
// Your logic here
return { result: "success" };
}
Advanced Settings
Slug
The unique URL identifier for your tool. It is auto-generated from the name but can be customized.
Example: get-weather becomes https://api.dwizi.com/t/get-weather.
Public vs. Private
- Private (Default): Requires an
Authorizationheader to run. Safe for internal tools. - Public: Anyone with the link can run the tool. Use this for demos or open utilities.
Input Schema (JSON)
This defines what arguments the AI model should send to your tool. It follows the JSON Schema standard.
Hint: You can click "Infer from source" to automatically generate this schema based on your TypeScript function signature.
Example:
{
"type": "object",
"required": ["city"],
"properties": {
"city": { "type": "string", "description": "The city name" }
}
}
Environment Variables (JSON)
Define secret keys or configuration values here. These are injected into your tool's environment at runtime.
Format: A simple JSON object with string keys and values.
{
"API_KEY": "sk_12345",
"BASE_URL": "https://api.example.com"
}
Accessing in Code:
- Node.js:
process.env.API_KEY - Deno:
Deno.env.get("API_KEY")
Command Override (Pro)
Allows you to change the container entrypoint. Only use this if you are an advanced user running custom binaries or complex scripts.