Skip to content

v3.7.0: Prevent redundant decompilation by agents

Latest

Choose a tag to compare

@elliotttate elliotttate released this 25 Mar 19:05
· 7 commits to main since this release

What's New

Fixes a critical agent workflow issue where LLM agents would repeatedly run ILSpy decompilation instead of using the pre-built Roslyn index for code lookups, wasting significant time on each query.

Problem

Agents were calling decompile_game over and over (with the same params) then grepping the output, instead of using search_game_code / get_entity_source / browse_namespace which read from the pre-built Roslyn index in milliseconds.

Fixes

  • Guard on decompile_game: Now checks if source already exists (>100 .cs files) and returns early with a message pointing to search tools. Added force parameter to override when actually needed (game updates)
  • Updated tool descriptions: All code lookup tools (search_game_code, get_entity_source, browse_namespace, get_setup_status) now explicitly state the index is pre-built and ready, with clear "do NOT call decompile_game" guidance
  • Fixed misleading error message: game_data.py no longer directs agents to call decompile_game when indexing isn't ready — points to get_setup_status instead
  • Stronger decompile_game description: Clearly states this is only for game updates, not normal code lookups

Changed Files

  • sts2mcp/server.py — Tool descriptions + decompile guard with force parameter
  • sts2mcp/game_data.py — Error message fix
  • pyproject.toml — Version bump to 3.7.0