create_tool
Build custom executable tools by providing TypeScript or Python code and a JSON Schema input definition. Use these generated tools to automate tasks through a secure code interpreter.
Instructions
Create a new tool. This tool will be used to create new tools. You can use the tools you have created to perform tasks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"description": "<description>",
"code": "<code>",
"input_schema": "<input_schema>",
"language": "<language>"
},
"name": "create_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The Typescript code for the tool you are writing. The code should be a valid Typescript function named `execute` that takes one argument called `input`. When called, the `input` provided will match the schema of the `input_schema` of the tool. | |
| name | Yes | The name of the tool you are writing. This is what you will use to call the tool. | |
| language | Yes | The language of the tool you are writing. This must be either 'TYPESCRIPT' or 'PYTHON'. | |
| description | Yes | A description of the tool you are writing. This will help you or other agents or people pick the appropriate tool in the future. | |
| input_schema | Yes | The input schema for the tool. This must be provided as a valid JSON Schema object. |