Skip to main content
Glama

venice_create_embeddings

Generate text embeddings to enable semantic search and Retrieval-Augmented Generation (RAG) applications.

Instructions

Generate text embeddings for semantic search and RAG

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesText or array of texts to embed
modelNoEmbedding modeltext-embedding-ada-002

Implementation Reference

  • The handler function that calls the Venice API to create embeddings and returns the result summary.
    async ({ input, model }) => {
      const response = await veniceAPI("/embeddings", { method: "POST", body: JSON.stringify({ input, model }) });
      const data = await response.json() as EmbeddingsResponse;
      if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
      const embeddings = data.data || [];
      return { content: [{ type: "text" as const, text: `Generated ${embeddings.length} embedding(s), dimensions: ${embeddings[0]?.embedding?.length || 0}` }] };
    }
  • Zod schema defining the input parameters for the venice_create_embeddings tool.
      input: z.union([z.string(), z.array(z.string())]).describe("Text or array of texts to embed"),
      model: z.string().optional().default("text-embedding-ada-002").describe("Embedding model"),
    },
  • Registration of the venice_create_embeddings tool in the registerInferenceTools function.
      "venice_create_embeddings",
      "Generate text embeddings for semantic search and RAG",
      {
        input: z.union([z.string(), z.array(z.string())]).describe("Text or array of texts to embed"),
        model: z.string().optional().default("text-embedding-ada-002").describe("Embedding model"),
      },
      async ({ input, model }) => {
        const response = await veniceAPI("/embeddings", { method: "POST", body: JSON.stringify({ input, model }) });
        const data = await response.json() as EmbeddingsResponse;
        if (!response.ok) return { content: [{ type: "text" as const, text: `Error: ${data.error?.message || response.statusText}` }] };
        const embeddings = data.data || [];
        return { content: [{ type: "text" as const, text: `Generated ${embeddings.length} embedding(s), dimensions: ${embeddings[0]?.embedding?.length || 0}` }] };
      }
    );
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 of behavioral disclosure. It states the tool 'generates' embeddings, implying a computational operation, but doesn't mention potential side effects, rate limits, authentication needs, or output format. For a tool with no annotation coverage, this is a significant gap in transparency, as it leaves key behavioral traits unspecified.

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 extremely concise and front-loaded, consisting of a single, clear sentence: 'Generate text embeddings for semantic search and RAG.' Every word earns its place by defining the tool's purpose and use cases without unnecessary details, making it efficient and easy to parse.

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 complexity of an embedding generation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits, output format, and usage context, which are crucial for an AI agent to invoke it correctly. The description alone doesn't provide enough information to fully understand the tool's operation and limitations.

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 description adds minimal meaning beyond the input schema, which has 100% coverage. It implies the 'input' parameter is for text to embed, but doesn't elaborate on semantics like text length limits or encoding. The schema already describes parameters well, so the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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 tool's purpose: 'Generate text embeddings for semantic search and RAG.' It specifies the verb ('generate'), resource ('text embeddings'), and primary use cases ('semantic search and RAG'). However, it doesn't explicitly differentiate from sibling tools like 'venice_chat' or 'venice_list_models', which might also involve text processing or model-related operations, leaving some ambiguity about its unique role.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions use cases ('semantic search and RAG') but doesn't specify prerequisites, constraints, or when to choose it over other tools like 'venice_chat' for text-related tasks. This lack of context makes it harder for an AI agent to decide appropriately.

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