Skip to main content
Glama

Create embeddings

create_embedding

Generates embedding vectors from text or token arrays for semantic search, clustering, and similarity tasks. Specify a model and input to obtain numerical representations.

Instructions

Creates an embedding vector representing the input text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNoEnd-user identifier
inputYesInput text(s) or token array(s) to embed.
modelYesID of the model to use
dimensionsNoOutput vector dimensions
encoding_formatNoOutput formatfloat
X-TokenLab-Delivery-PolicyNoPer-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Veri…

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.24
    • addedInput schema / properties / X-TokenLab-Delivery-Policy
      Added value: +{
      +  "description": "Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Veri…",
      +  "enum": [
      +    "auto",
      +    "verified",
      +    "official"
      +  ],
      +  "type": "string"
      +}
  2. Changed3 schema fields changedv0.6.4
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / dimensions / maximum
      Removed value: -9007199254740991
    • changedInput schema / properties / input / oneOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "items": {
      -      "type": "number"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "items": {
      -      "items": {
      -        "type": "number"
      -      },
      -      "type": "array"
      -    },
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "items": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "type": "array"
      +  }
      +]
  3. Addedv0.3.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the mutation profile is covered structurally. The description adds nothing beyond that: no rate-limit notes, model applicability, batch behavior, or cost/latency context, despite the tool being an externally-hitting (openWorld) generation call.

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

Conciseness4/5

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

A single front-loaded sentence with zero redundancy or filler. It is efficient, though arguably under-specified for a 6-parameter tool.

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?

There is no output schema, so the description is the only place to explain the return value — yet it says nothing about the shape of the returned vectors, the effect of dimensions or encoding_format on output, or batching of array inputs. For a generation tool with six parameters and no output schema, this leaves meaningful gaps.

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 coverage is 100%, so every parameter (input, model, dimensions, encoding_format, user, delivery policy) is already documented in the schema. The description adds no syntax, format, or batching detail beyond it, so the baseline 3 applies.

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?

States a specific verb and resource ("Creates an embedding vector") with the input scope ("representing the input text"), so the core action is unambiguous. It does not, however, distinguish itself from the sibling create_multimodal_embedding, leaving the agent to infer the difference.

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 when-to-use guidance, no exclusions, and no mention of the obvious alternative create_multimodal_embedding. The agent gets no criteria for selecting this tool over its sibling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.