Skip to main content
Glama

set_glass_effects

Configure Liquid Glass visual properties (specular, blur, shadow, translucency) on a selected layer group in a .icon bundle, with control over blend mode and lighting.

Instructions

Configure Liquid Glass effects (specular, blur, shadow, translucency) on a layer group in an existing .icon bundle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bundle_pathYesPath to .icon bundle
group_indexNoGroup index to modify (0-based)
specularNoEnable/disable specular highlights
blur_materialNoBlur amount (0-1, null to disable)
shadow_kindNoShadow type
shadow_opacityNoShadow opacity
translucency_enabledNoEnable translucency
translucency_valueNoTranslucency amount
opacityNoGroup opacity
blend_modeNoBlend mode
lightingNoLighting mode

Implementation Reference

  • Core handler function for set_glass_effects. Reads the .icon manifest, applies specular, blur-material, shadow, translucency, opacity, blend-mode, and lighting to a group, then saves the manifest.
    export async function setGlassEffects(params: SetGlassParams): Promise<McpResult> {
      try {
        const { manifest } = await readIconBundle(params.bundle_path);
    
        if (manifest.groups.length === 0) {
          return err('Error: No groups in this icon bundle');
        }
    
        const group = manifest.groups[Math.min(params.group_index, manifest.groups.length - 1)];
    
        if (params.specular !== undefined) group.specular = params.specular;
        if (params.blur_material !== undefined) group['blur-material'] = params.blur_material;
    
        if (params.shadow_kind !== undefined || params.shadow_opacity !== undefined) {
          group.shadow = {
            kind: params.shadow_kind ?? group.shadow?.kind ?? 'layer-color',
            opacity: params.shadow_opacity ?? group.shadow?.opacity ?? 0.5,
          };
        }
    
        if (params.translucency_enabled !== undefined || params.translucency_value !== undefined) {
          group.translucency = {
            enabled: params.translucency_enabled ?? group.translucency?.enabled ?? false,
            value: params.translucency_value ?? group.translucency?.value ?? 0.4,
          };
        }
    
        if (params.opacity !== undefined) group.opacity = params.opacity;
        if (params.blend_mode) group['blend-mode'] = toBlendMode(params.blend_mode);
        if (params.lighting) group.lighting = params.lighting;
    
        await saveManifest(params.bundle_path, manifest);
    
        return ok(`Updated glass effects on group ${params.group_index} in ${params.bundle_path}`);
      } catch (error: unknown) {
        const msg = error instanceof Error ? error.message : 'Unknown error';
        return err(`Error: ${msg}`);
      }
    }
  • Parameter interface SetGlassParams defining all input fields: bundle_path, group_index, specular, blur_material, shadow_kind, shadow_opacity, translucency_enabled, translucency_value, opacity, blend_mode, lighting.
    export interface SetGlassParams {
      bundle_path: string;
      group_index: number;
      specular?: boolean;
      blur_material?: number | null;
      shadow_kind?: 'neutral' | 'layer-color' | 'none';
      shadow_opacity?: number;
      translucency_enabled?: boolean;
      translucency_value?: number;
      opacity?: number;
      blend_mode?: string;
      lighting?: 'combined' | 'individual';
    }
  • src/server.ts:107-129 (registration)
    MCP tool registration for 'set_glass_effects' with Zod schema validation for all parameters, delegating to setGlassEffects handler.
    // ── Tool: set_glass_effects ──
    server.tool(
      'set_glass_effects',
      'Configure Liquid Glass effects (specular, blur, shadow, translucency) on a layer group in an existing .icon bundle.',
      {
        bundle_path: z.string().describe('Path to .icon bundle'),
        group_index: z.number().default(0).describe('Group index to modify (0-based)'),
        specular: z.optional(z.boolean()).describe('Enable/disable specular highlights'),
        blur_material: z.optional(z.number().min(0).max(1).nullable()).describe('Blur amount (0-1, null to disable)'),
        shadow_kind: z.optional(z.enum(['neutral', 'layer-color', 'none'])).describe('Shadow type'),
        shadow_opacity: z.optional(z.number().min(0).max(1)).describe('Shadow opacity'),
        translucency_enabled: z.optional(z.boolean()).describe('Enable translucency'),
        translucency_value: z.optional(z.number().min(0).max(1)).describe('Translucency amount'),
        opacity: z.optional(z.number().min(0).max(1)).describe('Group opacity'),
        blend_mode: z.optional(z.enum([
          'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',
          'color-dodge', 'color-burn', 'soft-light', 'hard-light',
          'difference', 'exclusion', 'plus-darker', 'plus-lighter',
        ])).describe('Blend mode'),
        lighting: z.optional(z.enum(['combined', 'individual'])).describe('Lighting mode'),
      },
      async (params) => setGlassEffects(params),
    );
  • src/cli.ts:148-180 (registration)
    CLI command registration for 'glass' which wraps setGlassEffects, parsing options from command-line arguments.
    // ── glass ──
    
    program
      .command('glass')
      .description('Set glass effects on a group')
      .argument('<bundle_path>', 'Path to the .icon bundle')
      .option('--group-index <n>', 'Group index', toInt, 0)
      .option('--specular', 'Enable specular highlight')
      .option('--no-specular', 'Disable specular highlight')
      .option('--blur-material <n>', 'Blur material value', toFloat)
      .option('--shadow-kind <kind>', 'Shadow kind (neutral, layer-color, none)')
      .option('--shadow-opacity <n>', 'Shadow opacity', toFloat)
      .option('--translucency-enabled', 'Enable translucency')
      .option('--no-translucency-enabled', 'Disable translucency')
      .option('--translucency-value <n>', 'Translucency value', toFloat)
      .option('--opacity <n>', 'Layer opacity', toFloat)
      .option('--blend-mode <mode>', 'Blend mode')
      .option('--lighting <type>', 'Lighting type (combined or individual)')
      .action(async (bundle_path, opts) => {
        await run(() =>
          setGlassEffects({
            bundle_path,
            group_index: opts.groupIndex,
            specular: opts.specular,
            blur_material: opts.blurMaterial,
            shadow_kind: opts.shadowKind,
            shadow_opacity: opts.shadowOpacity,
            translucency_enabled: opts.translucencyEnabled,
            translucency_value: opts.translucencyValue,
            opacity: opts.opacity,
            blend_mode: opts.blendMode,
            lighting: opts.lighting,
          }),
  • BlendMode type definition and toBlendMode helper used by setGlassEffects to validate and convert blend mode strings.
    export type BlendMode =
      | 'normal' | 'multiply' | 'screen' | 'overlay'
      | 'darken' | 'lighten' | 'color-dodge' | 'color-burn'
      | 'soft-light' | 'hard-light' | 'difference' | 'exclusion'
      | 'plus-darker' | 'plus-lighter';
    
    const VALID_BLEND_MODES: ReadonlySet<string> = new Set<BlendMode>([
      'normal', 'multiply', 'screen', 'overlay',
      'darken', 'lighten', 'color-dodge', 'color-burn',
      'soft-light', 'hard-light', 'difference', 'exclusion',
      'plus-darker', 'plus-lighter',
    ]);
    
    /** Validate a string as a BlendMode, returning 'normal' if invalid. */
    export function toBlendMode(value: string | undefined): BlendMode {
      if (value && VALID_BLEND_MODES.has(value)) {
        return value as BlendMode;
      }
      return 'normal';
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It implies mutation ('Configure') but does not disclose side effects, reversibility, or permission requirements. It lists the affected effects, which is somewhat helpful, but lacks depth on behavioral traits. Adequate but not thorough.

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?

Single sentence with no wasted words. It is front-loaded with the purpose and efficiently conveys the tool's function. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 parameters and no output schema or annotations, the description is adequate but lacks completeness. It does not mention what happens after configuration (e.g., success indicator, error conditions, or persistence). The schema descriptions cover parameters, but the overall context of usage (e.g., need to create a bundle first, or that effects are applied immediately) 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 100%, so baseline is 3. The description lists some effect types (specular, blur, shadow, translucency) that map to parameters, but these are already described in the schema. The description adds no additional semantic context beyond what the schema provides, such as relationships between parameters or default behavior.

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 the action ('Configure'), the resource ('Liquid Glass effects on a layer group'), and the scope ('in an existing .icon bundle'). It is a specific verb+resource that distinguishes from siblings like 'render_liquid_glass' which likely performs rendering rather than configuration.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. The description does not mention prerequisites, exclusions, or related tools. For example, it does not indicate whether 'render_liquid_glass' should be used afterward or if this tool supersedes other effect settings.

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