Using it with an AI assistant
AI assistants are good at Lua, but they do not know evasive's API. Left alone they invent functions that do not exist. Give them the real reference and they write scripts that load on the first try much more often.
There are two ways to do that: plain text files you hand to the assistant, and an MCP server it can query by itself. Both are public and read only, with no sign in and no key.
The quick way: the text files
Two files are written for language models:
| File | What is in it |
|---|---|
https://evasive.dev/llms.txt |
A short overview: how scripts work and every namespace. |
https://evasive.dev/llms-full.txt |
The full reference: every function, the rules, the limits and the example scripts. |
Paste the link to llms-full.txt into your chat, or download the file and attach it, then describe the script you want. If the assistant cannot open links, attach the file.
You can also copy both links from the menu. Scripts > Use with AI has a button for each.
The better way: the MCP server
Assistants that support MCP can look things up on their own while they write. They search the API, read one function at a time, list the events, read the rules and fetch example scripts. That keeps the conversation short and the answers exact.
The server address is:
https://evasive.dev/mcpAdd it to your assistant as a remote MCP server over HTTP, named evasive. Most assistants have a settings page or a config file for MCP servers where you paste the address. Some add servers from a terminal command. Scripts > Use with AI in the menu has a button that copies the address and one that copies a ready terminal command.
Once it is added, the assistant has these tools:
| Tool | What it does |
|---|---|
list_namespaces |
Every namespace, what it is for and which permission it needs. |
search_api |
Searches every name, signature and description. |
get_function |
The full entry for one name, like draw.text or Player:is_visible. |
list_events and get_event |
The callback events and their arguments. |
get_rules |
The rules every script must follow, the permissions and the limits. |
get_example |
A complete example script. |
Asking for a script
A few things make the result better:
- Say what it should look like and when. "Show the bomb timer over the planted C4, in white with an outline, only while it ticks" works better than "make a bomb timer".
- Name the permissions you have on. If Allow internet connections is off, say so, and the assistant will not reach for
http. - Ask it to follow the rules. "Read the rules first" or "follow llms-full.txt" helps it keep drawing inside
paint, check for nil and create controls at the top level. - Ask for settings. "Add a checkbox to turn it off and a colour picker" gives you
uicontrols you can change without editing the file.
When it does not work
- Load the script and open Scripts > Console.
- Copy the error line. The console's copy icon takes all shown lines.
- Paste it back to the assistant with the script.
An error like attempt to call a nil value (field 'xyz') usually means the assistant made up a function. Tell it the name does not exist and ask it to look it up in the reference. draw.* only works inside paint handlers means it drew outside paint. stale player means it kept a player object across frames instead of its index.
Turn on Reload on file change in Scripts > Other, and every fix you paste into the file is live as soon as you save.
Next
The examples are complete scripts you can load as they are, or hand to an assistant as a starting point.