Skip to main content
Glama
xujfcn
by xujfcn

list_models

Discover available AI models on Crazyrouter by filtering categories like chat, image, video, audio, or music to find the right model for your task.

Instructions

List available AI models on Crazyrouter. Filter by category: chat, image, video, audio, or music.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter models by category. Options: chat, image, video, audio, music. Omit to show all categories.

Implementation Reference

  • The registration and handler implementation for the `list_models` tool.
    // --- Tool: list_models ---
    server.tool(
      "list_models",
      "List available AI models on Crazyrouter. Filter by category: chat, image, video, audio, or music.",
      {
        category: z
          .enum(["chat", "image", "video", "audio", "music"])
          .optional()
          .describe("Filter models by category. Options: chat, image, video, audio, music. Omit to show all categories."),
      },
      async ({ category }) => {
        try {
          let liveModels: string[] = [];
          try {
            const result = (await apiRequest("/models")) as { data?: Array<{ id: string; owned_by?: string }> };
            if (result.data) liveModels = result.data.map((m) => m.id);
          } catch { /* fall back to local list */ }
    
          let output = "";
          if (category) {
            const models = MODEL_CATEGORIES[category] ?? [];
            output = `## ${category.charAt(0).toUpperCase() + category.slice(1)} Models\n\n`;
            output += models.map((m) => `- ${m}`).join("\n");
            output += `\n\nTotal: ${models.length} models listed (${liveModels.length > 0 ? liveModels.length + " total available via API" : "627+ total available"})`;
          } else {
            output = "## Available Model Categories\n\n";
            for (const [cat, models] of Object.entries(MODEL_CATEGORIES)) {
              const emoji = cat === "chat" ? "šŸ’¬" : cat === "image" ? "šŸŽØ" : cat === "video" ? "šŸŽ¬" : cat === "audio" ? "šŸ—£ļø" : "šŸŽµ";
              output += `### ${emoji} ${cat.charAt(0).toUpperCase() + cat.slice(1)} (${models.length} listed)\n`;
              output += models.map((m) => `- ${m}`).join("\n");
              output += "\n\n";
            }
            output += `---\nšŸ“Š Total: 627+ models available on Crazyrouter\nšŸ”— Full list: https://crazyrouter.com/models`;
          }
    
          return { content: [{ type: "text" as const, text: output }] };
        } catch (error) {
          const message = error instanceof Error ? error.message : "Unknown error occurred";
          return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true };
        }
      }
    );
Behavior2/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 mentions filtering by category but doesn't disclose behavioral traits like pagination, rate limits, authentication needs, or what 'available' means (e.g., free vs. paid, active vs. all). This leaves gaps in understanding how the tool behaves beyond basic listing.

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 a single, efficient sentence that front-loads the purpose ('List available AI models on Crazyrouter') and adds necessary detail ('Filter by category...'). There is zero waste, and every word earns its place, making it highly concise and well-structured.

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 the tool's low complexity (one optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter use, but lacks details on output format, error handling, or behavioral context. Without annotations or output schema, more completeness would be beneficial for an AI agent.

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%, with the parameter 'category' fully documented in the schema (including enum values and omission behavior). The description adds minimal value by listing the categories, which is already in the schema, but doesn't provide additional semantics like examples or edge cases. Baseline 3 is appropriate as the schema does the heavy lifting.

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 action ('List available AI models') and resource ('on Crazyrouter'), with specific filtering capability by category. It distinguishes from siblings like 'chat', 'generate_image', and 'generate_video' by being a listing tool rather than a generation tool. However, it doesn't explicitly contrast with potential other listing tools (none present in siblings).

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 for listing models with optional filtering, but doesn't explicitly state when to use this tool versus alternatives. Since siblings are generation tools (chat, generate_image, generate_video), the distinction is clear by function, but no explicit guidance on when to choose listing over generation or vice versa is provided.

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/xujfcn/crazyrouter-mcp'

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