Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TM MCP Pack MLHook

Tool pack for tm-control-mcp exposing MLHook's existing exports over MCP. Public tools are MLHook.<Name>. Uses only MLHook's exported API — no MLHook changes.

Tools

Tool Wraps
MLHook.Ping pack liveness
MLHook.ListCoverage list this pack's tools
MLHook.GetInfo Version, event/queue prefixes, hook event names
MLHook.SendCustomEvent Queue_{SH,PG,Menu,Editor}_SendCustomEvent
MLHook.InjectManialink InjectManialinkTo{Playground,Menu,Editor} (+ToMLScript when isScript)
MLHook.RemoveInjectedML RemoveInjectedMLFrom{Playground,Menu,Editor}
MLHook.RemoveAllInjectedML RemoveAllInjectedML (this pack's pages only)
MLHook.MessageManialink Queue_MessageManialink{Playground,PlaygroundServer,Menu,Editor}
MLHook.ToMLScript ToMLScript
MLHook.RegisterHook RegisterMLHook with a capturing hook that buffers events
MLHook.UnregisterHook UnregisterMLHookFromAll
MLHook.ListHooks registered hooks + buffer stats
MLHook.GetEvents read buffered events (cursor: pass back nextSeq as sinceSeq)
MLHook.ClearEvents clear the buffer
MLHook.WaitForEvent yield until a new matching event is captured

Event capture: hooks registered via RegisterHook append into one shared ring buffer (2000 events, strings capped at 16 KiB). Custom types listen for MLHook_Event_<type>; isNadeoEvent=true listens for the raw type.

Build / dev loop

./build.sh dev            # stage + LSP check + load via tm-control-mcp (fallback: tm-remote-build)
./build.sh release-check  # same without DEV defines

Smoke:

python3 ../tm-control-mcp/tools/call.py MLHook.Ping
python3 ../tm-control-mcp/tools/call.py MLHook.RegisterHook '{"type":"MyEvent"}'
python3 ../tm-control-mcp/tools/call.py MLHook.GetEvents '{"sinceSeq":0}'

Dependencies

Hard: tm-control-mcp, MLHook. The plugin does not load without them.

About

Openplanet tool pack exposing MLHook's exports as MCP tools for Trackmania: Manialink injection, custom events, and buffered event capture via tm-control-mcp

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages