Skip to main content
Glama

adb_tunnel_close

Close a managed ADB tunnel by ID or all at once, removing its forward/reverse entry and cleanup registration.

Instructions

Close a managed tunnel by ID, or all managed tunnels at once. The corresponding adb forward/reverse entry is removed and the tunnel is dropped from the cleanup registry. Use adb_tunnel_list to see active tunnel IDs.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
idYesTunnel ID (tun_XXXXXX) returned by adb_tunnel_open, or the literal string 'all' to close every managed tunnel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv1.1.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key side effects: the paired adb forward/reverse entry is removed and the tunnel is dropped from the cleanup registry. It does not state error behavior for an unknown ID or whether the close is irreversible, which are the remaining gaps for an unannotated mutation tool.

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

Conciseness5/5

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

Three short sentences with the primary operation front-loaded, then side effects, then the pointer to the discovery tool. No filler or redundant wording.

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 one-parameter tool with no output schema and no annotations, the description covers operation, scope, side effects, and ID discovery adequately. Only failure modes and the outcome when 'all' matches no tunnels are left unstated.

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 100% and the schema already documents the tun_XXXXXX format and the literal 'all' value in detail. The description restates that same dual behavior, adding clarity of intent but no new meaning beyond the schema, so the baseline applies.

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?

States a specific verb and resource ("Close a managed tunnel") and a scope variant ("or all managed tunnels at once"), which cleanly separates it from adb_tunnel_open and adb_tunnel_list among the siblings.

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 routes the agent to adb_tunnel_list to obtain valid tunnel IDs, giving clear pre-call guidance. It does not discuss when to prefer adb_forward_remove or adb_reverse_remove instead, though the statement that those entries are removed automatically implicitly covers that.

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

Deploy Server

Other Tools