Skip to main content
Glama

generate_icon

Create app icons, favicons, and UI elements in multiple sizes and formats using natural language prompts. Specify visual style, background, corners, and output format for custom icon generation.

Instructions

Generate app icons, favicons, and UI elements in multiple sizes and formats

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDescription of the icon or UI element to generate
sizesNoArray of icon sizes in pixels (16, 32, 64, 128, 256, 512, 1024)
typeNoType of icon to generateapp-icon
styleNoVisual style of the iconmodern
formatNoOutput formatpng
backgroundNoBackground type: transparent, white, black, or color nametransparent
cornersNoCorner style for app iconsrounded
previewNoAutomatically open generated images in default viewer

Implementation Reference

  • Handler for generate_icon tool: constructs a specialized prompt using buildIconPrompt and calls the shared image generator.
    case "generate_icon": {
      const prompt = this.buildIconPrompt(args);
      const imageRequest: ImageGenerationRequest = {
        prompt,
        outputCount:
          Array.isArray(args?.sizes) && args?.sizes.length > 0
            ? args.sizes.length
            : 1,
        mode: "generate",
        preview: args?.preview as boolean,
        noPreview:
          (args?.noPreview as boolean) ||
          (args?.["no-preview"] as boolean),
      };
      response =
        await this.imageGenerator.generateTextToImage(imageRequest);
      break;
    }
  • TypeScript interface defining the arguments for the generate_icon tool.
    export interface IconPromptArgs {
      prompt?: string;
      type?: string;
      style?: string;
      background?: string;
      corners?: string;
    }
  • Registration of the generate_icon tool in the list of available tools, including detailed input schema.
    {
      name: "generate_icon",
      description:
        "Generate app icons, favicons, and UI elements in multiple sizes and formats",
      inputSchema: {
        type: "object",
        properties: {
          prompt: {
            type: "string",
            description:
              "Description of the icon or UI element to generate",
          },
          sizes: {
            type: "array",
            items: { type: "number" },
            description:
              "Array of icon sizes in pixels (16, 32, 64, 128, 256, 512, 1024)",
          },
          type: {
            type: "string",
            enum: ["app-icon", "favicon", "ui-element"],
            description: "Type of icon to generate",
            default: "app-icon",
          },
          style: {
            type: "string",
            enum: ["flat", "skeuomorphic", "minimal", "modern"],
            description: "Visual style of the icon",
            default: "modern",
          },
          format: {
            type: "string",
            enum: ["png", "jpeg"],
            description: "Output format",
            default: "png",
          },
          background: {
            type: "string",
            description:
              "Background type: transparent, white, black, or color name",
            default: "transparent",
          },
          corners: {
            type: "string",
            enum: ["rounded", "sharp"],
            description: "Corner style for app icons",
            default: "rounded",
          },
          preview: {
            type: "boolean",
            description:
              "Automatically open generated images in default viewer",
            default: false,
          },
        },
        required: ["prompt"],
      },
    },
  • Helper function that constructs the AI prompt for generating icons based on provided arguments.
    private buildIconPrompt(args?: IconPromptArgs): string {
      const basePrompt = args?.prompt || "app icon";
      const type = args?.type || "app-icon";
      const style = args?.style || "modern";
      const background = args?.background || "transparent";
      const corners = args?.corners || "rounded";
    
      let prompt = `${basePrompt}, ${style} style ${type}`;
    
      if (type === "app-icon") {
        prompt += `, ${corners} corners`;
      }
    
      if (background !== "transparent") {
        prompt += `, ${background} background`;
      }
    
      prompt += ", clean design, high quality, professional";
    
      return prompt;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool generates but lacks critical behavioral details: it doesn't mention whether this is a read-only or mutating operation (though 'generate' implies creation), any rate limits, authentication needs, or what the output looks like (e.g., file paths, URLs, or binary data). For a tool with 8 parameters and no output schema, this is a significant gap in transparency.

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?

The description is appropriately sized and front-loaded in a single, efficient sentence: 'Generate app icons, favicons, and UI elements in multiple sizes and formats.' Every word earns its place by specifying the action, resources, and key features without redundancy or fluff, making it easy to scan and understand quickly.

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

Completeness2/5

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

Given the tool's complexity (8 parameters, no annotations, no output schema), the description is incomplete. It covers the basic purpose but fails to address behavioral aspects like output format details, potential side effects, or usage constraints. Without annotations or output schema, the agent lacks crucial context for proper invocation and result handling, making this inadequate for a tool of this scope.

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?

The description adds minimal meaning beyond the input schema, which has 100% coverage with detailed parameter descriptions. It implies parameters like 'sizes' and 'formats' through 'multiple sizes and formats,' but doesn't explain semantics beyond what's in the schema. Since schema coverage is high, the baseline score is 3, as the description doesn't compensate with additional param context but doesn't detract either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Generate app icons, favicons, and UI elements in multiple sizes and formats.' It specifies the verb 'generate' and the resources 'app icons, favicons, and UI elements,' making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'generate_image' or 'generate_pattern,' which might also create visual assets.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'generate_image' (which might be for general images) or 'edit_image' (for modifications), leaving the agent to infer usage context. There's no explicit 'when' or 'when not' advice, making it rely solely on the tool name and description for selection.

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/Aeven-AI/mcp-nanobanana'

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