How to Add Custom Tools
ConsoleX AI provides rich options to help users implement tool functions from scratch to extend the capability boundaries of large models.
Define Tool Parameter Structure via JSON Schema
First, the first step is to create a JSON Schema that describes your tool. The format is consistent with the OpenAI Function Calling JSON Schema Definition. You can also use AI to generate JSON Schema from natural language.
Set Tool Calling Method and Endpoint
Next, you can choose whether to enable tool calling.
- When disabled, the large model will generate calling parameters based on the tool's JSON Schema but will not initiate calls. This can be used to test the effectiveness of model-generated calling parameters when the tool function is not yet implemented.
- When enabled, the large model will initiate calls to the Webhook URL or use Mock data to simulate calls.
The next step is to set the calling method. You can choose GET or POST requests to call tool functions and set the source type of the tool function and the Webhook URL of the tool function.
- You can implement and publish cloud functions yourself, then add them as tools through Webhook URL. You can specify the API-Key required for calling the Webhook URL, which will be carried in the request header's Authorization in Bearer format, like:
Authorization: Bearer <your-api-key>
- Utilize some workflow orchestration tools, such as n8n, Dify, Make.com. We can orchestrate workflows on these platforms and then add these workflows as tools. See specific help for details.
- You can also use Mock data to simulate calls, which is suitable for testing the quality of secondary generation results from large models when tool functions are not yet implemented.
Specify Result Generation Method
Finally, you can specify the method for synthesizing results. There are three choices here:
- Direct output result. In this mode, the tool output results will be directly returned and the conversation will end.
- Secondary generation through AI models. In this mode, the results returned by tool calls will be provided to the model for secondary result generation.
- Template synthesis. In this mode, templates will be used to combine tool-returned parameters to synthesize results and end the conversation. Variables can be inserted in templates through {...}. If the variable name matches the property name in the JSON object returned by the tool, the variable name will be replaced with the property value. For example, if the template content is:
The following is the image generated by Flux.1:
The result returned by the tool is:
{ "image_url":<the-image-url>, "prompt":"......" .....}
The output content after replacement is:
The following is the image generated by Flux.1:
Tool Creation Limitations
Starter plan users can create up to three custom tools, while Builder plan and Master plan users can create unlimited tools. When users use custom tools, ConsoleX AI does not charge any fees.