Skip to main content
Glama

BlankQR

Switch a code off or on

switch_code
DestructiveIdempotent

With the key: switches an existing code off, or back on. Use it to pause a code and keep what it does, for a sticker that is lost or a campaign that is over. To change what a scan does, use set_code. A switched-off code shows a notice and nothing else until it is switched back on. A blank code can be switched off too: a scan then cannot set it up. Returns the code with its new state.

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": {
      "code": "<code>",
      "token": "<token>",
      "on": "<on>"
    },
    "name": "switch_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
onYesfalse switches the code off, true switches it back on. What the code does is kept either way.
codeYesThe 7 characters at the end of the code's short address, the part after the last slash.
tokenYesThe key of the code, from the answer that made it. With an account key, "" for a code of that account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=true, idempotentHint=true, openWorldHint=true), yet the description still adds real context: the paused code keeps its behavior, a switched-off code only shows a notice, a blank code can also be disabled so a scan cannot set it up, and the call returns the code with its new state. It does not state auth/permission requirements beyond 'With the key', which is why this sits just below the top.

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 definition is front-loaded with the action, followed by purpose, alternative, and consequences; every sentence contributes something. It is slightly longer than strictly needed (the blank-code edge case could be tighter), but nothing is 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?

With no output schema, the description correctly states the return value ('Returns the code with its new state') and covers the important behavioral edge cases of a paused or blank code. Only permission/authorization detail for the token is left implicit, a minor gap for a 3-parameter mutation 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 100%, with 'on', 'code', and 'token' each documented in the schema itself, including the account-key empty-string case. The description adds only the framing that the operation is performed 'with the key' and that state is preserved either way, so the schema does the heavy lifting and the baseline 3 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?

The description states a specific verb and resource ('switches an existing code off, or back on') and immediately distinguishes it from the sibling that changes behavior ('To change what a scan does, use set_code'). An agent can tell switch_code apart from set_code without opening either 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 gives concrete when-to-use scenarios ('a sticker that is lost or a campaign that is over') and names the alternative with the condition that selects it ('To change what a scan does, use set_code'). No exclusion or routing decision is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources