Skip to main content
Glama

passwall2_switch_node

Switches PassWall 2 to a specified node index with a write-safety gate: snapshots the current node, reloads the service, probes DNS, and rolls back automatically if it fails.

Instructions

WRITE (gated): switch PassWall 2 to a node index. Requires PASSWALL2_ALLOW_WRITE=1 and confirm=true. Snapshots the previous node, reloads the service, probes DNS, and restores on failure.

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": {
      "index": "<index>"
    },
    "name": "passwall2_switch_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes
confirmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so well: it discloses that a state snapshot is taken, the service is reloaded, DNS is probed, and the previous node is restored on failure. That covers destructive side effects, rollback safety, and gating requirements in a single sentence.

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, front-loaded with the write classification and gating requirement before the side-effect details. Every clause carries actionable information with no filler.

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 mutating, rollback-capable tool with no annotations and no output schema, the definition covers gating, side effects, and failure handling. It does not describe what a successful return looks like or how to confirm the switch took effect, which would be the remaining gap for an agent verifying the result.

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 description coverage is 0%, so the description must compensate for two undocumented parameters. It explains that 'confirm=true' is an explicit safety gate rather than a default-false toggle, and refers to 'index' as a node index, but never says where that index comes from or how it maps to node names, leaving the more important parameter under-specified.

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 gives a specific verb and resource ('switch PassWall 2 to a node index') and marks it 'WRITE (gated)', which cleanly separates it from the read-oriented siblings like passwall2_status, passwall2_nodes, and passwall2_active. An agent can classify the operation 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?

It states concrete preconditions for use: PASSWALL2_ALLOW_WRITE=1 must be set and confirm=true must be passed, which tells the agent this is not a casual read path. It stops short of naming an alternative or telling the agent to first enumerate nodes with passwall2_nodes to obtain a valid index, so guidance is clear but not complete.

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