Skip to main content
Glama

get_icon

Fetch all details for an Aurum icon: drawable paths, Compose path, paired Figma node IDs, and deeplinks. Optionally specify weight to focus on line or fill variant.

Instructions

Fetch full details for a single Aurum icon by name: drawable resource paths, Compose path (AurumIcons.<Category>.<Name>), paired line/fill Figma node IDs, and deeplinks. Pass weight to focus on one variant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesIcon name, e.g. `ChevronRight`. Case-insensitive.
weightNoWhich weight to highlight (`line`, `fill`, or `both`).both

Implementation Reference

  • The handler function for the 'get_icon' tool. It receives a manifest and args (name, weight), looks up the icon by name (case-insensitive), and returns formatted details including drawable paths, Figma links, and Compose usage code.
      async handler(manifest, args) {
        const name = String(args.name ?? "").trim();
        if (!name) {
          return {
            content: [{ type: "text", text: "Missing required `name` argument." }],
            isError: true,
          };
        }
        const weight = (args.weight as string | undefined) ?? "both";
        const ic = manifest.icons.find((x) => x.name.toLowerCase() === name.toLowerCase());
        if (!ic) {
          const hits = manifest.icons
            .filter((x) => x.name.toLowerCase().includes(name.toLowerCase()))
            .slice(0, 5)
            .map((x) => `\`${x.category}.${x.name}\``)
            .join(", ");
          const hint = hits ? ` Did you mean ${hits}?` : "";
          return {
            content: [{ type: "text", text: `No icon named \`${name}\`.${hint}` }],
            isError: true,
          };
        }
    
        const lines: string[] = [
          `# AurumIcons.${ic.category}.${ic.name}`,
          "",
          `**Category:** ${ic.category}  `,
          "",
        ];
        if (weight === "line" || weight === "both") {
          lines.push(`### Line variant`);
          lines.push(`- Drawable: \`${ic.lineDrawable}\``);
          if (ic.lineFigmaUrl) lines.push(`- Figma: [${ic.lineFigmaNodeId}](${ic.lineFigmaUrl})`);
          lines.push("");
        }
        if (weight === "fill" || weight === "both") {
          lines.push(`### Fill variant`);
          lines.push(`- Drawable: \`${ic.fillDrawable}\``);
          if (ic.fillFigmaUrl) lines.push(`- Figma: [${ic.fillFigmaNodeId}](${ic.fillFigmaUrl})`);
          lines.push("");
        }
        lines.push(`### Compose usage`);
        lines.push("```kotlin");
        lines.push(`AurumIcon(`);
        lines.push(`    imageVector = AurumIcons.${ic.category}.${ic.name}${weight === "fill" ? "Filled" : ""},`);
        lines.push(`    contentDescription = null,`);
        lines.push(`)`);
        lines.push("```");
    
        return { content: [{ type: "text", text: withFooter(manifest, lines.join("\n")) }] };
      },
    };
  • The inputSchema for the 'get_icon' tool, defining the required 'name' (string) and optional 'weight' (enum: line/fill/both) parameters.
    inputSchema: {
      type: "object",
      required: ["name"],
      properties: {
        name: {
          type: "string",
          description: "Icon name, e.g. `ChevronRight`. Case-insensitive.",
        },
        weight: {
          type: "string",
          enum: ["line", "fill", "both"],
          default: "both",
          description: "Which weight to highlight (`line`, `fill`, or `both`).",
        },
      },
      additionalProperties: false,
    },
  • Import and registration of getIconTool in the tools array. Line 30 imports it, line 41 adds it to the exported tools list.
    import { getIconTool } from "./get-icon.js";
    import { getChangelogTool } from "./get-changelog.js";
    import { lookupFigmaNodeTool } from "./lookup-figma-node.js";
    import { searchTool } from "./search.js";
    import { getAurumVersionTool } from "./get-aurum-version.js";
    
    export const tools: ToolDef[] = [
      listComponentsTool,
      getComponentTool,
      listTokensTool,
      searchIconsTool,
      getIconTool,
  • src/server.ts:40-46 (registration)
    The MCP server registration where tools (including getIconTool) are exposed via ListToolsRequestSchema and dispatched via CallToolRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: tools.map(({ name, description, inputSchema }) => ({
        name,
        description,
        inputSchema,
      })),
    }));
  • The withFooter helper function used by the get_icon handler to append a version footer with Aurum version, manifest SHA, and generation timestamp.
    export function withFooter(manifest: Manifest, body: string): string {
      return body + versionFooter(manifest);
    }
Behavior4/5

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

With no annotations, the description carries the full burden. It details the return types (paths, IDs, deeplinks) and the effect of the weight parameter. It does not mention side effects, authentication needs, or read-only status, but the operation is clearly a data fetch with no destructiveness implied.

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 sentences with no redundancy. The first sentence states purpose and return types concisely; the second adds a usage hint. Every sentence 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?

Given no output schema, the description adequately lists what is returned. For a simple tool with two parameters, it covers the core functionality. It could mention missing-icon behavior or pagination but is otherwise 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?

The input schema already provides full descriptions for both parameters (100% coverage). The description adds only minor nuance ('Pass weight to focus on one variant'), which largely restates the enum's purpose. Thus, the description adds limited value beyond the schema.

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 uses a specific verb ('Fetch full details') and identifies the resource ('single Aurum icon by name'). It lists the specific information returned (drawable resource paths, Compose path, Figma node IDs, deeplinks), clearly distinguishing it from sibling tools like search_icons which search for icons.

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 usage (fetch details by name) and offers guidance on the weight parameter to focus on a variant. However, it does not explicitly state when to use this tool versus alternatives like search_icons, nor does it provide conditions for use or exclusion.

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/atri-jar/aurum-mcp'

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