Skip to main content
Glama

Text embeddings

embed_text
Read-only

Convert up to 100 texts into 1024-dimension vectors for semantic search, RAG, clustering, deduplication, and recommendations.

Instructions

Turn up to 100 texts (40,000 characters in all) into 1024-dimension embedding vectors (BGE-M3, 100+ languages) for semantic search, RAG, clustering, deduplication and recommendations. Costs $0.001 per call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "texts": "<texts>"
    },
    "name": "embed_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textsYesTexts to embed, up to 100 and 40,000 characters in all, e.g. ["refund policy", "how do I get my money back?"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries most of the burden and does so well: it discloses the per-call price ($0.001), the model, the vector dimension, and the batching caps. It does not state whether output order matches input order, whether vectors are normalized, or what happens when the total character budget is exceeded, which are the remaining behavioral unknowns for a paid API call.

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?

A single front-loaded sentence packs the verb, limits, output shape, model, use cases, and cost with no filler. Nothing could be removed without losing operative information.

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?

For a one-parameter tool with no output schema, the description supplies the critical return-value fact (1024-dimension vectors) plus cost and limits, which is enough to call it correctly. Minor gaps remain around ordering guarantees and normalization of the returned vectors.

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% and includes an example, so the baseline is 3; the description earns an extra point by stating the aggregate 40,000-character budget, a constraint not expressible in the schema where only per-item maxLength and maxItems are set. It adds no guidance on how to structure texts for good embedding quality.

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 names a concrete transformation (texts into 1024-dimension embedding vectors), the model (BGE-M3), and the supported use cases (semantic search, RAG, clustering, deduplication, recommendations). It is clearly distinguishable from a generic text utility, though it never references the nearby sibling classify_text, which could plausibly be confused with embedding for classification-style tasks.

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?

Intended applications are enumerated explicitly, giving an agent solid context for when to reach for this tool rather than, say, classify_text or ask_llm. There are no explicit exclusions or stated when-not conditions, so it stops short of full routing guidance.

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