Skip to main content
Glama
Leee62
by Leee62

get_icon_repos

Retrieve all available icon repository names from the Iconify API for designers and developers to access SVG icons through natural language requests.

Instructions

get all icon repo NAME

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_icon_repos' tool. It calls getIconRepoNames() to fetch icon repositories and returns their names as a JSON string in the response content, or an error message if failed.
    server.tool("get_icon_repos", "get all icon repo NAME", {}, async () => {
      const allRepos = await getIconRepoNames();
    
      if (!allRepos) {
        return {
          content: [
            {
              type: "text",
              text: "Failed to Get Repo Infos",
            },
          ],
        };
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(Object.keys(allRepos)),
          },
        ],
      };
    });
  • src/index.ts:24-46 (registration)
    Registration of the 'get_icon_repos' tool using server.tool(), including empty schema {} and inline handler.
    server.tool("get_icon_repos", "get all icon repo NAME", {}, async () => {
      const allRepos = await getIconRepoNames();
    
      if (!allRepos) {
        return {
          content: [
            {
              type: "text",
              text: "Failed to Get Repo Infos",
            },
          ],
        };
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(Object.keys(allRepos)),
          },
        ],
      };
    });
  • Helper function getIconRepoNames() that fetches the list of all icon repositories from the Iconify API.
    /** get all icon repo names */
    export async function getIconRepoNames<T>(): Promise<T | null> {
      try {
        const res = await fetch(`https://api.iconify.design/collections`, {
          method: "GET",
        });
    
        if (!res.ok) {
          throw new Error(`HTTP error! status: ${res.status}`);
        }
        return (await res.json()) as T;
      } catch (error) {
        console.error("Error making request:", error);
        return null;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states the action ('get all icon repo NAME') without disclosing behavioral traits such as whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination), or any rate limits. This leaves significant gaps for a tool that presumably retrieves data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (three words), which is efficient, but it's poorly structured and unclear due to the awkward phrasing 'icon repo NAME'. It could be more front-loaded with a clearer purpose, but it avoids unnecessary verbosity.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'get all' entails (e.g., list of repositories, full details), what 'NAME' refers to, or what the return values are. For a tool with no structured data to rely on, this leaves the agent with insufficient information to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. However, the mention of 'NAME' in the description is confusing since there are no parameters, slightly reducing clarity.

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

Purpose3/5

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

The description 'get all icon repo NAME' has a clear verb ('get') and resource ('icon repo NAME'), but it's grammatically awkward and ambiguous about what 'NAME' refers to. It doesn't distinguish from sibling tools like 'get_icon_detail_by_prefix_and_name' or 'get_icons_by_desc_and_prefix', which suggests this might retrieve repository metadata rather than individual icons.

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 guidance is provided on when to use this tool versus the sibling tools. The description doesn't indicate whether this is for listing repositories, fetching repository details, or another purpose, leaving the agent to guess based on the tool name alone.

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/Leee62/pickapicon-mcp'

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