Skip to main content
Glama

Get icon code

get_icon
Read-onlyIdempotent

Get one icon, outline or solid, as SVG, JSX, a framework component snippet, a data URI, CSS mask, Tailwind class, CDN URL, sprite, font, Iconify id, or shadcn command. Unknown names return the closest real names.

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": {
      "name": "<name>"
    },
    "name": "get_icon"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesIcon name from search_icons, such as "arrow-right" (PascalCase also works).
sizeNoWidth and height in pixels (default 24).
colorNoStroke color, or fill color for solid (default currentColor).
styleNoIcon style (default "outline"). "solid" is the filled twin, for selected or active states; it ignores stroke options.
formatNoOutput format (default "svg"). Framework ids return an import snippet.
strokeWidthNoStroke width (default 2). Outline only.
absoluteStrokeWidthNoKeep the stroke width constant when resizing.

Output Schema

NameRequiredDescriptionDefault
urlYes
codeYes
nameYes
styleYes
formatYes
installNo
componentNameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / color / description
      Previous value: -"Stroke color (default currentColor)."New value: +"Stroke color, or fill color for solid (default currentColor)."
    • changedInput schema / properties / strokeWidth / description
      Previous value: -"Stroke width (default 2)."New value: +"Stroke width (default 2). Outline only."
    • addedInput schema / properties / style
      Added value: +{
      +  "description": "Icon style (default \"outline\"). \"solid\" is the filled twin, for selected or active states; it ignores stroke options.",
      +  "enum": [
      +    "outline",
      +    "solid"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / style
      Added value: +{
      +  "enum": [
      +    "outline",
      +    "solid"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "componentName",
      -  "format",
      -  "code",
      -  "url"
      -]New value: +[
      +  "name",
      +  "componentName",
      +  "format",
      +  "style",
      +  "code",
      +  "url"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "svg",
      -  "jsx",
      -  "react",
      -  "react-native",
      -  "vue",
      -  "svelte",
      -  "solid",
      -  "preact",
      -  "astro",
      -  "angular",
      -  "data-uri",
      -  "base64",
      -  "css-mask",
      -  "tailwind",
      -  "cdn",
      -  "sprite",
      -  "font",
      -  "iconify",
      -  "shadcn"
      -]New value: +[
      +  "svg",
      +  "jsx",
      +  "react",
      +  "react-native",
      +  "vue",
      +  "svelte",
      +  "solid",
      +  "preact",
      +  "astro",
      +  "angular",
      +  "qwik",
      +  "lit",
      +  "flutter",
      +  "compose",
      +  "data-uri",
      +  "base64",
      +  "css-mask",
      +  "tailwind",
      +  "cdn",
      +  "sprite",
      +  "font",
      +  "iconify",
      +  "shadcn"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "svg",
      -  "jsx",
      -  "react",
      -  "react-native",
      -  "vue",
      -  "svelte",
      -  "solid",
      -  "preact",
      -  "astro",
      -  "angular",
      -  "data-uri",
      -  "base64",
      -  "css-mask",
      -  "cdn",
      -  "sprite",
      -  "font",
      -  "iconify",
      -  "shadcn"
      -]New value: +[
      +  "svg",
      +  "jsx",
      +  "react",
      +  "react-native",
      +  "vue",
      +  "svelte",
      +  "solid",
      +  "preact",
      +  "astro",
      +  "angular",
      +  "data-uri",
      +  "base64",
      +  "css-mask",
      +  "tailwind",
      +  "cdn",
      +  "sprite",
      +  "font",
      +  "iconify",
      +  "shadcn"
      +]
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower. The description nonetheless adds a genuinely non-obvious trait: fuzzy name resolution with nearest-match fallback instead of an error — information present nowhere in the annotations or schema.

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?

A single front-loaded sentence that leads with the core action and scope, then lists output breadth compactly. The format list is long but is the tool's defining value proposition, so every token 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?

Output schema is present and the schema fully documents all 7 parameters, so the description doesn't need to cover return shapes. Combined with annotations, it gives the agent enough to call correctly; only the lack of sibling routing guidance keeps it from being complete.

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 description coverage is 100% and every parameter (size, color, style, format, strokeWidth, absoluteStrokeWidth) is documented in the schema, so baseline is 3. The description's enumeration of formats and styles merely echoes the schema enums without adding syntax, defaults, or interaction rules.

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?

States a specific verb and resource ('Get one icon') plus the two style variants (outline/solid) and the full range of output artifacts. It's clearly distinguishable from search_icons/suggest_icons by being a single-item retrieval, though the description itself never names a sibling.

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?

Usage is only implied: 'Unknown names return the closest real names' tells the agent it can call directly without an exact match and doesn't need to search first. There is no explicit when-to-use / when-not statement and no reference to search_icons or suggest_icons.

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.