cmo-lua
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| cmo_search_apiA | Search the Command Lua function catalog taken from https://commandlua.github.io/assets/Functions.html. Use this before writing a script so the function name is real. Call cmo_get_function for the official page of one result. Examples:
|
| cmo_get_functionA | Fetch one function's page from the official Command Lua docs (commandlua.github.io). Use cmo_search_api if you are not sure of the exact name. |
| cmo_list_scenariosA | List .scen files in a folder using the XML wrapper only (title, setting, complexity). This does not unpack the scenario body. Pass the Command Scenarios directory, or a folder of your own saves. |
| cmo_read_scenarioA | Unpack one .scen file and return its sides, missions, unit counts, and events. Lua action scripts are included when include_scripts is true. Use this to see what a scenario already does before editing it. Official and saved scenarios are read locally; nothing is uploaded. |
| cmo_write_action_scriptA | Replace the ScriptText of one Lua event action and write a new .scen file. The original file is left unchanged unless output_path is that same file. The action is matched by its description, which cmo_read_scenario lists. Load the new file in Command to try it. This rewrites the compressed scenario body, so open the result in Command before you delete the original. |
| cmo_extract_projectA | Unpack a .scen file into a cmo-lua project: cmo-project.json plus one scripts/*.lua file per event action. Edit those files, then cmo_compile_loader. Refuses to replace an existing project unless overwrite is true. |
| cmo_read_projectA | Read cmo-project.json and the Lua source of each event. Use this after cmo_extract_project or when the user already has a project folder. |
| cmo_write_scriptA | Write a .lua file inside a cmo-lua project and, if needed, add or update the matching event in cmo-project.json. Paths cannot leave the project directory. |
| cmo_validate_projectA | Check cmo-project.json and its Lua files. Reports missing files, bad probabilities, and Command function names that are not in the official catalog. |
| cmo_compile_loaderA | Write install.lua for a project. Run that file once in the Command Lua console with the scenario loaded. It removes and recreates the project's events, triggers, and Lua actions. Validate first; compilation is refused when the project has errors. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| cmo_draft_event | Instructions for adding one Lua event to a cmo-lua project using the official Command API. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Most tools occupy clearly distinct roles: docs lookup (search_api/get_function) versus scenario inspection (list_scenarios/read_scenario) versus project workflows (extract/read/write/validate/compile). The main risk is cmo_write_action_script vs cmo_write_script, which both "write Lua" but differ in target (raw .scen event vs project file) — descriptions clarify but the names alone are close. cmo_read_scenario and cmo_read_project are also adjacent but resolvable from context.
Every tool uses the cmo_ prefix followed by a verb_noun snake_case pattern (search_api, get_function, list_scenarios, read_scenario, write_action_script, extract_project, read_project, write_script, validate_project, compile_loader). No camelCase or style mixing; the pattern is predictable throughout.
Ten tools is well within the ideal 3-15 range and each maps to a distinct step in the docs-lookup and scenario/project lifecycle. No tool feels redundant or like padding; the counts split naturally between reference lookup and file manipulation.
The surface covers the full workflow: look up real functions, inspect existing scenarios, extract to a project, edit scripts, validate function names, and compile a loader. Minor gaps exist — no tool to create a brand-new scenario from scratch, no delete/rename of events, and no direct write-back of a compiled .scen (by design, via install.lua). These are workaroundable but leave the lifecycle slightly one-directional.