Skip to main content
Glama

venice_chat

Send messages to Venice AI's open-source LLMs for chat responses, with configurable models, prompts, and generation parameters.

Instructions

Send a message to Venice AI and get a response from an LLM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel ID (e.g., llama-3.3-70b, deepseek-r1-llama-70b)llama-3.3-70b
messageYesThe user message to send
system_promptNoOptional system prompt
temperatureNoSampling temperature (0-2)
max_tokensNoMaximum tokens to generate

Implementation Reference

  • The handler function for the venice_chat tool. It constructs messages, calls the Venice AI chat completions API via veniceAPI, and returns the response content or error.
    async ({ model, message, system_prompt, temperature, max_tokens }) => {
      const messages: Array<{role: string; content: string}> = [];
      if (system_prompt) messages.push({ role: "system", content: system_prompt });
      messages.push({ role: "user", content: message });
    
      const response = await veniceAPI("/chat/completions", {
        method: "POST",
        body: JSON.stringify({ model, messages, temperature, max_tokens }),
      });
    
      const data = await response.json() as ChatCompletionResponse;
      if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
      return { content: [{ type: "text" as const, text: data.choices?.[0]?.message?.content || "No response" }] };
    }
  • Input schema using Zod for validating parameters: model, message, system_prompt, temperature, max_tokens.
    {
      model: z.string().optional().default("llama-3.3-70b").describe("Model ID (e.g., llama-3.3-70b, deepseek-r1-llama-70b)"),
      message: z.string().describe("The user message to send"),
      system_prompt: z.string().optional().describe("Optional system prompt"),
      temperature: z.number().optional().default(0.7).describe("Sampling temperature (0-2)"),
      max_tokens: z.number().optional().default(2048).describe("Maximum tokens to generate"),
    },
  • The server.tool registration for venice_chat, including name, description, input schema, and inline handler function.
    server.tool(
      "venice_chat",
      "Send a message to Venice AI and get a response from an LLM",
      {
        model: z.string().optional().default("llama-3.3-70b").describe("Model ID (e.g., llama-3.3-70b, deepseek-r1-llama-70b)"),
        message: z.string().describe("The user message to send"),
        system_prompt: z.string().optional().describe("Optional system prompt"),
        temperature: z.number().optional().default(0.7).describe("Sampling temperature (0-2)"),
        max_tokens: z.number().optional().default(2048).describe("Maximum tokens to generate"),
      },
      async ({ model, message, system_prompt, temperature, max_tokens }) => {
        const messages: Array<{role: string; content: string}> = [];
        if (system_prompt) messages.push({ role: "system", content: system_prompt });
        messages.push({ role: "user", content: message });
    
        const response = await veniceAPI("/chat/completions", {
          method: "POST",
          body: JSON.stringify({ model, messages, temperature, max_tokens }),
        });
    
        const data = await response.json() as ChatCompletionResponse;
        if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
        return { content: [{ type: "text" as const, text: data.choices?.[0]?.message?.content || "No response" }] };
      }
    );
  • src/index.ts:16-16 (registration)
    Main server initialization calls registerInferenceTools(server), which registers the venice_chat tool among other inference tools.
    registerInferenceTools(server);
  • veniceAPI helper function used in the handler to make authenticated HTTP requests to the Venice AI API.
    export async function veniceAPI(endpoint: string, options: RequestInit = {}): Promise<Response> {
      const url = `${BASE_URL}${endpoint}`;
      const headers: Record<string, string> = {
        "Authorization": `Bearer ${API_KEY}`,
        "Content-Type": "application/json",
        ...(options.headers as Record<string, string> || {}),
      };
      return fetch(url, { ...options, headers });
    }
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral context. It mentions sending a message and getting a response but lacks details on rate limits, authentication needs, error handling, or response format. This is inadequate for a tool with multiple parameters and no output 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?

The description is a single, efficient sentence that directly states the tool's purpose without redundancy. It's front-loaded and wastes no words, making it easy to parse quickly.

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?

For a chat tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the response structure, error cases, or practical usage context, leaving significant gaps despite the clear purpose.

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 fully documents all 5 parameters. The description adds no additional parameter semantics beyond implying 'message' is the core input. Baseline 3 is appropriate as the schema handles parameter documentation effectively.

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 ('Send a message to Venice AI and get a response from an LLM'), specifying both the verb ('send') and resource ('Venice AI'). It distinguishes from siblings like image generation or API key management by focusing on chat functionality, though it doesn't explicitly name alternatives.

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 alternatives. While the description implies it's for chat interactions, it doesn't specify scenarios, prerequisites, or exclusions compared to other Venice AI tools like text-to-speech or embeddings.

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/georgeglarson/venice-mcp'

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