Skip to main content
Glama

toggle_fx

Enable or disable all Liquid Glass effects (specular, shadow, blur, translucency) on every group in an .icon bundle with a single command.

Instructions

Enable or disable all Liquid Glass effects (specular, shadow, blur, translucency) on every group in the .icon bundle at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bundle_pathYesPath to .icon bundle
enabledYestrue to enable all FX, false to disable

Implementation Reference

  • The main handler function for toggle_fx. Iterates over all groups in the icon bundle manifest and enables or disables specular, shadow, and translucency effects based on the `enabled` parameter. blur-material is intentionally left untouched.
    export async function toggleFx(params: ToggleFxParams): Promise<McpResult> {
      try {
        const { manifest } = await readIconBundle(params.bundle_path);
    
        for (const group of manifest.groups) {
          if (params.enabled) {
            group.specular = true;
            if (!group.shadow || group.shadow.kind === 'none') {
              group.shadow = { kind: 'layer-color', opacity: 0.5 };
            }
          } else {
            group.specular = false;
            group.shadow = { kind: 'none', opacity: 0 };
            if (group.translucency) {
              group.translucency.enabled = false;
            }
          }
          // blur-material intentionally NOT touched
        }
    
        await saveManifest(params.bundle_path, manifest);
    
        return ok(`${params.enabled ? 'Enabled' : 'Disabled'} all FX on ${manifest.groups.length} group(s) in ${params.bundle_path}`);
      } catch (error: unknown) {
        const msg = error instanceof Error ? error.message : 'Unknown error';
        return err(`Error: ${msg}`);
      }
    }
  • Input parameter interface for toggleFx. Accepts `bundle_path` (string) and `enabled` (boolean).
    export interface ToggleFxParams {
      bundle_path: string;
      enabled: boolean;
    }
  • src/server.ts:223-232 (registration)
    Registration of the 'toggle_fx' tool on the MCP server with Zod schema validation for bundle_path (string) and enabled (boolean). Delegates to the toggleFx handler.
    // ── Tool: toggle_fx ──
    server.tool(
      'toggle_fx',
      'Enable or disable all Liquid Glass effects (specular, shadow, blur, translucency) on every group in the .icon bundle at once.',
      {
        bundle_path: z.string().describe('Path to .icon bundle'),
        enabled: z.boolean().describe('true to enable all FX, false to disable'),
      },
      async (params) => toggleFx(params),
    );
  • Helper function `ok` used to return a successful McpResult with a text message.
    function ok(text: string): McpResult {
      return { content: [{ type: 'text', text }] };
    }
  • Helper function `err` used to return an error McpResult with a text message.
    function err(text: string): McpResult {
      return { content: [{ type: 'text', text }], isError: true };
    }
Behavior2/5

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

With no annotations, the description should carry behavioral disclosure. It says it affects all groups at once but does not mention potential side effects, performance implications, or reversibility. Lacks details like whether it overwrites or restores default settings.

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?

Single sentence is concise and front-loaded. No redundant words, though could be slightly more structured (e.g., listing effects separately).

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?

Tool has only 2 simple parameters and no output schema. Description covers the action and parameter purpose adequately. Lacks mention of output or idempotency, but completeness is reasonable given simplicity.

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 clear parameter descriptions. The description adds no new semantic meaning beyond stating true enables, false disables, which matches the schema. Baseline score of 3 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?

The description clearly states it enables/disables all Liquid Glass effects on every group in the .icon bundle, using specific verbs (enable/disable) and resource (Liquid Glass effects on groups in bundle). It distinguishes from siblings like set_glass_effects which likely handles individual effects.

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

Usage Guidelines3/5

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

The description implies bulk toggling use case but does not explicitly guide when to use this versus siblings like set_glass_effects. No exclusions or when-not-to-use hints provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ethbak/icon-composer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server