Creating a Tool
Overview
A tool on Rival packages executable logic - a Function, an MCP server, or a Storm workflow - into a reusable, versioned endpoint that you can run from the app or call via API.
There are two ways to build one:
- Chat with RivalBot in Studio (recommended). Describe what you want, RivalBot generates the code, test cases, metadata, and icon, then drops you into the Tool Editor to review.
- Manual in the Tool Editor. Start from a blank tool and fill in each step yourself.
Both paths use the same Tool Editor and the same flow.
Before you start
Before creating a tool, make sure:
- You have access to an organization
- You know what your tool should do and what its inputs and outputs look like
- You know which language you want to use - Python, Python 3.13 — Fast, JavaScript, Lua, or Storm
Opening Studio
To start a new tool:
- Sign in at cortexone.rival.io
- Open Build from the sidebar (or go to
/studio) - Click New tool, or describe what you want in the RivalBot prompt
If you describe it to RivalBot, you’ll land in the Tool Editor with code, test cases, metadata, and icon already drafted. If you click New tool, you’ll start at the first step of the Tool Editor with empty fields. See Building with RivalBot for the chat-first flow.
The Tool Editor
The Tool Editor walks you through the following steps, in order. You can move between them freely, but each one needs to be filled in before you can publish.
Basic Info
Defines your tool’s identity. Set the tool name (unique within your organization), a short description used in listings, and classify it with category, sectors, and tags. These fields drive marketplace search and filtering.
You also select the language (Python, Python 3.13 — Fast, JavaScript, Lua, or Storm) and tool type. Language and type are fixed once chosen.
Code
This is the main development surface.
- Code editor. Write your handler in the editor. Python and Python 3.13 — Fast support multiple files; JavaScript, Lua, and Storm are single-file. The runtime expects a file named
cortexone_function.py/.js/.luaexposing acortexone_handlerentry point - the editor scaffolds this for you. - Input schema and events. Define how your tool is triggered and what inputs it expects. Edit the schema as JSON or with the form builder; both produce the same shape.
- Environment Secrets. Attach secrets from your workspace (managed at
/user/secrets) so your handler can read them as env vars. See Environment Variables. - Test panel. A toggle at the top of the step switches between Test mode and Publish mode. In Test mode you create test cases and run them against your draft code. See Testing & Executing for details.
Branding
Upload an icon for your tool or have RivalBot generate one. Good branding matters for marketplace discoverability but the icon can be replaced any time.
Overview
A short, plain-language description of what the tool does, when to use it, and any limits or strengths. This is the first thing a marketplace user reads. You can have RivalBot draft this from your code and metadata.
Documentation
Long-form markdown documentation: inputs, outputs, example calls, edge cases. If you let RivalBot generate the Overview, it can generate Documentation in the same pass.
Publish
The final step. Set visibility (Private for org-only, or Public to submit to the marketplace), pricing (free or paid per run), and release notes, then publish. Publishing queues the version for marketplace review when public; you’ll be notified by email when it’s approved. See Versions & Publishing for the full release flow.
After publishing
Your tool gets a stable URL and is callable via the Rival API. It also shows up in My Tools (/my-tools) under the Built by you tab, where you can monitor runs, publish new versions, edit metadata, or deprecate / delete it.