Skip to main content
Glama

custom_js_toggle

Enable or disable a store's custom JavaScript without editing the code. Requires merchant approval before toggling.

Instructions

Turn the store's custom JavaScript on or off without changing the code. Get the merchant's OK first.

Input Schema

NameRequiredDescriptionDefault
enabledYes
version_idNoTheme version ID (from theme_versions_list). Defaults to 987654321.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose that this is a state-changing operation that preserves the script content and that merchant consent is required. It says nothing about which theme/version is affected when omitted, whether the change is instantly live, or what the result looks like, so a mutation tool remains under-described.

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?

Two short sentences, zero filler, with the action stated before the approval caveat. Every clause earns its place.

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 two-parameter toggle with no output schema, the description covers action, scope, and consent. It omits what the tool returns and which theme version is targeted by default, but the schema already documents the version default, so little is missing.

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 50%: version_id is documented in the schema with its default, while `enabled` relies on its type alone. The description's 'on or off' loosely maps to `enabled` but adds no format, default, or edge-case guidance for either parameter. Baseline 3 for partial coverage is appropriate.

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 ('turn on or off') and resource ('the store's custom JavaScript') with a scope qualifier 'without changing the code' that separates it from custom_js_update. An agent can tell this is an enablement toggle, not a content edit, 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?

'Without changing the code' implicitly routes the agent here rather than to custom_js_update when only the enabled state should change, and 'Get the merchant's OK first' supplies a real prerequisite. No sibling is named explicitly and no when-not-to-use case is given, so it falls 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.