Repository navigation
TL;DR Addons and servers can now ship their own MCP tools to the agent, and Lua errors come back with a traceback.
Tool packages
Addons and servers can provide extra tools as Lua files at lua/gterm_packages/<package>.lua. Since lua/ is networked, a server can AddCSLuaFile a package and give the agent capabilities it would otherwise lack, such as acting on a dedicated server's realm. See the README for the file format and an example.
New MCP tools:
list_tool_packages: lists packages visible in the current sessionrequest_tool_packages: opens a consent prompt in GTerm's consolecall_package_tool: runs a tool from an enabled package with a JSON args object
Consent
Packages are opt-in, and only the user can enable them:
- Type
packagesin GTerm to enable or disable packages for the current server without an agent. get_game_statusoffers newly discovered packages once and lists the enabled ones with their tools, so the agent knows what it can use.- Consent is stored in
Config.jsonunderToolPackageConsent, per server IPv4 (orlocalfor listen servers and singleplayer) and per file hash. A changed package is asked again. - Enabled packages are dropped on disconnect, map change or server change.
- Game output is held while the prompt is open and printed once it closes.
Requires sv_allowcslua 1, since discovery runs client-realm Lua.
Lua errors
Runtime errors from run_lua, package tools, screenshots and GTerm's own helper scripts now include a stack traceback instead of only the error message. Errors in helper scripts are reported as such rather than as a timeout or an empty result.