Skip to main content
Glama
ClawyPro

Clawy MCP Server

by ClawyPro

llm_chat

Get AI chat completions with smart model routing that automatically selects Claude, GPT, Gemini, or Llama based on task complexity. Pay per call with USDC credits without managing API keys.

Instructions

Smart-routed LLM chat completion. Automatically selects the optimal model (Claude, GPT, Gemini, Llama) based on task complexity. No API keys needed — pay per call with USDC credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel selection: 'auto' for smart routing (recommended), or specify a model directly
messagesYesChat messages array
temperatureNoSampling temperature (0-2, default 0.7)
max_tokensNoMaximum response tokens

Implementation Reference

  • The generic tool handler in src/index.ts executes the llm_chat tool by making an HTTP request to the endpoint defined in the tool configuration (src/llm/chat.ts).
      async (params) => {
        const method = tool.method || "POST";
        const result = await gatewayRequest(method, tool.endpoint, params as Record<string, unknown>);
    
        if (result.error) {
          return {
            content: [{ type: "text" as const, text: `Error (${result.status}): ${result.error}` }],
            isError: true,
          };
        }
    
        const text = typeof result.data === "string"
          ? result.data
          : JSON.stringify(result.data, null, 2);
    
        return {
          content: [{ type: "text" as const, text }],
        };
      },
    );
  • Schema definition for llm_chat input parameters using Zod.
      inputSchema: z.object({
        model: z.enum(["auto", "gpt-5-nano", "kimi-k2p5", "claude-opus-4-6"]).optional()
          .describe("Model selection: 'auto' for smart routing (recommended), or specify a model directly"),
        messages: z.array(z.object({
          role: z.enum(["system", "user", "assistant"]),
          content: z.string(),
        })).describe("Chat messages array"),
        temperature: z.number().optional().describe("Sampling temperature (0-2, default 0.7)"),
        max_tokens: z.number().optional().describe("Maximum response tokens"),
      }),
      endpoint: "/v1/llm/chat",
    },
  • src/llm/chat.ts:6-19 (registration)
    Registration and configuration of the llm_chat tool.
      name: "llm_chat",
      description: "Smart-routed LLM chat completion. Automatically selects the optimal model (Claude, GPT, Gemini, Llama) based on task complexity. No API keys needed — pay per call with USDC credits.",
      inputSchema: z.object({
        model: z.enum(["auto", "gpt-5-nano", "kimi-k2p5", "claude-opus-4-6"]).optional()
          .describe("Model selection: 'auto' for smart routing (recommended), or specify a model directly"),
        messages: z.array(z.object({
          role: z.enum(["system", "user", "assistant"]),
          content: z.string(),
        })).describe("Chat messages array"),
        temperature: z.number().optional().describe("Sampling temperature (0-2, default 0.7)"),
        max_tokens: z.number().optional().describe("Maximum response tokens"),
      }),
      endpoint: "/v1/llm/chat",
    },
Behavior4/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 effectively adds context beyond the input schema by explaining the smart routing mechanism ('automatically selects the optimal model based on task complexity'), payment model ('pay per call with USDC credits'), and key convenience feature ('No API keys needed'). However, it doesn't cover rate limits, error handling, or response format details.

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 perfectly concise with two sentences that each earn their place: the first explains the core functionality and smart routing, the second covers the business model and key convenience feature. It's front-loaded with the most important information and has zero wasted words.

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 the tool's complexity (multi-model LLM chat with routing logic) and the absence of both annotations and output schema, the description does a good job covering the essential behavioral aspects. However, it doesn't explain what the tool returns (response format, structure) or potential limitations, which would be helpful given the lack of output schema.

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%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific semantics beyond what's in the schema (e.g., it doesn't explain 'messages' format or 'temperature' effects). The baseline score of 3 is appropriate when the schema does the heavy lifting for parameter documentation.

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 clearly states the tool's purpose with specific verbs ('smart-routed LLM chat completion') and resources ('Claude, GPT, Gemini, Llama'), distinguishing it from siblings by focusing on multi-model LLM chat rather than search, translation, or data queries. It explicitly mentions the core functionality of automatic model selection based on task complexity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('smart-routed LLM chat completion'), but does not explicitly state when not to use it or name alternatives among the sibling tools. It implies usage for chat-based LLM tasks with automatic model routing, but lacks explicit exclusions or comparisons to other tools.

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/ClawyPro/clawy-mcp-server'

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