Skip to main content
Glama

Give the emulator back

emu_release
Destructive

Release only your session's emulator lease to reset test changes, optionally uninstall leased apps, and stop the emulator only if this session started it.

Instructions

Give back this session's lease when you are done: resets what test runs leave on the device (Firebase debug properties, a moved clock), uninstalls the apps installed under the lease when uninstall is true (or the listed packages), stops the emulator only if this lease started it (unless keep_running), then deletes the lease. Refused with NOT_OWNER for another session's lease: never try to release it, the person does that. No lease is not an error (released false). LEASE_CHANGED means another session took the lease over meanwhile: leave the emulator alone. Runs as a job: if the result is a job_id, call emu_job with it.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "emu_release"
  }
}

Input Schema

NameRequiredDescriptionDefault
avdNoAVD name (default "unity-test", or the EMU_AVD environment variable of the server).
packagesNoUninstall these package names instead of the recorded ones (needs uninstall true).
uninstallNoUninstall the apps installed under this lease (default false: they stay with their data).
keep_runningNoLeave the emulator running even if this lease started it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

The annotations only say this is destructive, non-read-only, and not idempotent. The description adds exactly the context they cannot carry: which device state is wiped (Firebase debug properties, a moved clock), that the emulator stops only if this lease started it, that the lease record is deleted, and how each failure code (NOT_OWNER, LEASE_CHANGED, no lease → released false) should be handled. No contradiction with destructiveHint or idempotentHint.

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?

The effect sequence is front-loaded and every clause (reset targets, uninstall condition, stop condition, three error outcomes, job handoff) carries information. But it is a single dense run-on paragraph, so the failure-mode rules are harder to scan than they should be.

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?

For a destructive, non-idempotent teardown tool with no output schema, the definition covers the mutation's side effects, the ownership and race error semantics, and the async job handoff. An agent has everything it needs to call it correctly and to react to each possible result.

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

Parameters4/5

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

Schema coverage is 100%, so all four parameters are already documented. The description still clarifies the cross-parameter relationship that 'packages' replaces the recorded set and only applies when uninstall is true, and restates the conditional stop via keep_running. That is real added meaning, though mostly reinforcing what the schema says, so it stays below a 5.

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?

The description names a specific verb ('Give back this session's lease') and resource (the lease), then enumerates the ordered work it performs: reset test residue, uninstall apps, conditionally stop the emulator, delete the lease. That is enough for an agent to distinguish it from emu_renew, emu_start, and emu_status without opening any schema.

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

Usage Guidelines5/5

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

It states the trigger ('when you are done') and gives explicit when-not rules: never release a NOT_OWNER lease because 'the person does that', and leave the emulator alone on LEASE_CHANGED. It also routes the agent to the sibling emu_job whenever a job_id comes back.

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