Skip to main content
Glama

embeddings

Read-only

Convert text into numeric vectors for similarity scoring and ranking. Use with vector similarity or rerank operations to compare documents or queries.

Instructions

Generate one embedding vector per input string (a single string or a list of strings). The default text.hash_embedding_v1 model produces deterministic lexical hash embeddings — identical input always yields the identical vector; provider-backed embedding models advertised by list_models are routed through the configured provider service. Use embedding_similarity to score two vectors or rerank to order documents against a query vector. Read-only; nothing is stored. Returns one {index, embedding, token_count} item per input plus total token usage. An unsupported model id fails with model_not_supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesText to embed: one string, or a list embedded item by item.
modelNoEmbedding model id from list_models.text.hash_embedding_v1
dimensionsNoLength of each returned embedding vector.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • addedInput schema / properties / dimensions / description
      Added value: +"Length of each returned embedding vector."
    • addedInput schema / properties / input / description
      Added value: +"Text to embed: one string, or a list embedded item by item."
    • addedInput schema / properties / model / description
      Added value: +"Embedding model id from list_models."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already provide readOnlyHint, openWorldHint, and destructiveHint, and the description adds substantial behavioral context beyond them: deterministic outputs for the default model, provider routing, the fact that nothing is stored, the exact per-item return shape, total token usage, and the specific model_not_supported error. This is rich, non-redundant disclosure.

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 information-dense but every sentence earns its place: primary behavior, model behavior, sibling routing, read-only safety, return format, and error semantics. The core action and key distinction are front-loaded, and nothing is padded or redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no output schema, the description covers everything an agent needs to invoke it correctly: input shape, model selection behavior, return item structure, token usage reporting, error behavior, and read-only semantics. The sibling navigation is also explicitly handled. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful semantic value for the model parameter: it names the default model, explains that it is deterministic and lexical, and clarifies that provider-backed models are advertised by list_models. It also clarifies the input cardinality for the input parameter. These additions raise it above baseline.

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 states a precise action and resource: 'Generate one embedding vector per input string.' It also distinguishes between the default deterministic hash model and provider-backed models, and explicitly routes the agent to sibling tools (embedding_similarity, rerank) for different operations, making it unmistakable what this tool does.

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

Usage Guidelines5/5

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

The description explicitly tells the agent when to use this tool versus related alternatives: 'Use embedding_similarity to score two vectors or rerank to order documents against a query vector.' It also clarifies the model source (list_models) and the failure mode for unsupported models, leaving no ambiguity about invocation context.

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

Deploy Server

Other Tools