Skip to main content
Glama

close_session

Idempotent

Restore the game to its original state by unloading hooks, disconnecting injection, and closing the index. Returns success only if all steps succeed; otherwise keeps session for retry.

Instructions

关闭当前会话:卸载所有 Hook、断开注入、关闭索引。只有真的恢复原状才 ok=true。

任一步失败会 ok=false + error,并保留会话以便重试 —— 这是有意的: 本工具的语义是「游戏已恢复原状」,一个假成功会让你带着仍被篡改的游戏收工。

做完了就调用它,把游戏恢复原状(卸载 Hook 后游戏行为回到未修改状态)。

只有真的恢复成功才返回 ok: True。 卸载 Hook / 卸载脚本 / detach 任何一步失败都会 ok: False + error,并保留会话以便重试 —— 这是有意为之:本工具的语义是「游戏已恢复原状」, 一个假成功会让 Agent 带着仍被篡改的游戏进程收工。

Input Schema

NameRequiredDescriptionDefault
close_indexNo
close_runtimeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the critical failure contract: any failed step yields `ok=false` plus `error`, the session is deliberately preserved for retry, and a false success would leave the agent with a still-tampered process. This is exactly the kind of intent-vs-result detail annotations cannot express, and it is consistent with destructiveHint=false / idempotentHint=true (teardown restores rather than destroys, and retry is safe).

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

Conciseness2/5

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

The core action is front-loaded in sentence one, but the same guarantee is restated three times ('只有真的恢复原状才 ok=true', '任一步失败会 ok=false + error 并保留会话以便重试', and again in the trailing paragraph). The duplication roughly doubles the length without adding information.

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

Completeness4/5

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

For a session-teardown tool with no output schema, the description supplies what matters most: the meaning of the `ok`/`error` result and the retry-preserving behavior. The remaining gap is the two boolean teardown flags, which are left unexplained for a 2-parameter tool.

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

Parameters3/5

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

Schema coverage is 0%, so the schema only gives titles and defaults. The description's '关闭索引' loosely maps to `close_index` and '卸载所有 Hook / 断开注入' to `close_runtime`, but it never explains what happens when either flag is false, nor when to override the defaults. Partial compensation only.

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

Purpose4/5

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

The opening states a specific verb and resource ('关闭当前会话') and enumerates exactly what teardown means: unload all hooks, detach injection, close the index. That enumeration implicitly separates it from narrower siblings like `unhook` or `hook_status`, though no sibling is named. An agent can tell what this does without opening the schema.

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?

'做完了就调用它,把游戏恢复原状' gives a clear trigger condition (work is finished, restore original state). There are no explicit exclusions or named alternatives such as `unhook` for partial teardown, so it stops short of a 5.

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