Skip to main content
Glama

open_game

Idempotent

Select a game and build or reuse its cross-engine metadata index, setting the active context for subsequent queries. Auto-detects IL2CPP, Mono, or Unreal and safely resets when switching games.

Instructions

选定游戏,并构建(或复用)它的元数据索引(跨引擎自动识别)。

之后所有查询工具都以这个游戏为上下文。切换游戏会重置会话 (已注入的运行时会被安全卸载)。

支持三种引擎,会自动识别: · IL2CPP — 元数据是 global-metadata.dat,逻辑在 GameAssembly.dll · Mono — 元数据是托管 dll(通常是 Assembly-CSharp.dll) · UE — 无集中元数据(能力以 get_diagnostics 报告为准)

重复调用同一个游戏不会重建(返回 reused=true,通常 10ms 内返回)。

Args: game_dir: 游戏安装目录(推荐;会自动识别引擎并定位元数据文件)。 metadata_path: 直接指定元数据文件(IL2CPP 用 global-metadata.dat, Mono 用某个 .dll;目录结构不标准时用)。 engine: 强制指定引擎(il2cpp / mono / ue),一般不用填。 cache_dir: 索引缓存目录,默认 ~/.gamemod/cache。 force_rebuild: 强制重建索引(怀疑缓存损坏时用)。

Returns: {ok, engine, engine_label, metadata_path, index: {type_count, method_count, field_count, capabilities...}, elapsed, reused}

Input Schema

NameRequiredDescriptionDefault
engineNo
game_dirNo
cache_dirNo
force_rebuildNo
metadata_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations by disclosing that switching games resets the session and safely unloads an already-injected runtime — a real side effect an agent must know about. It also explains caching behavior and the reused=true fast path, matching the idempotentHint while adding actionable detail on when a rebuild does or does not occur.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and session-role statement, then organized into engine bullets, repeat-call note, Args, and Returns. It is somewhat long and the Returns block lists a raw dict shape, but each section carries distinct information without filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description supplies the return shape (ok, engine, metadata_path, index counts, elapsed, reused). Combined with engine support notes and the pointer to get_diagnostics for UE capabilities, an agent has everything needed to call this correctly and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description fully compensates: game_dir as the recommended entry, metadata_path for nonstandard layouts with per-engine file names, engine for forced override ('generally not needed'), cache_dir's default of ~/.gamemod/cache, and force_rebuild's trigger condition. Every one of the five parameters gains meaning not present in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource: selects a game and builds (or reuses) its metadata index, with cross-engine auto-detection spelled out for IL2CPP/Mono/UE. It also states the tool's role as session-context setter for all downstream query tools, which cleanly separates it from siblings like find_game_processes or inspect_game.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says all query tools afterwards use this game as context and that switching games resets the session, and it documents the cheap repeat-call path (reused=true, ~10ms). It does not name a competing sibling (e.g., inspect_game vs find_game_processes) or state when not to call it, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.