Skip to main content
Glama

Text embeddings API: 1,024-dimension vectors for semantic search and RAG

ai_embeddings
Read-only

Text embeddings API: a 1,024-dimension vector for up to 4,000 characters of text in 100+ languages (BAAI BGE-M3), also OpenAI-compatible at /v1/embeddings. Use for semantic search, RAG retrieval, clustering, deduplication and similarity scoring. Example: text=pay-per-call APIs for AI agents. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesText to embed, up to 4,000 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and idempotentHint=false, but the description adds genuinely new context: per-call pricing ($0.01 via x402 USDC or card key), the first-25-free allowance, that failed calls are free, and the practical consequence that repeats are not free. That explains the non-idempotent billing behavior in a way the annotations cannot. It still omits rate limits and output/response specifics.

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?

The capability, dimension, model and length limit are front-loaded, followed by use cases, an example, then pricing. A few phrases are redundant with the annotations ('Reads or computes only and changes nothing'), and the commercial details take more space than the technical guidance, but nothing is unparseable.

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?

With no output schema, the description correctly tells the agent what comes back: a 1,024-dimension vector. Pricing and safety are covered too. What is missing is practical invocation detail such as whether the vector is normalized or the response envelope, which matters for a RAG consumer building on it.

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% for the single 'text' parameter, so the schema already documents the character limit. The description adds little parameter-level meaning beyond restating 4,000 characters and noting 100+ language support, which is baseline for a one-parameter tool with a fully documented schema.

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 states a specific verb and resource (text embeddings, 1,024-dimension vector for up to 4,000 characters, BAAI BGE-M3, 100+ languages) and lists concrete use cases. It does not, however, differentiate itself from the sibling 'ai_embed' or explain how it differs from 'ai_rerank', so an agent must guess between two embedding-looking tools.

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?

It gives clear when-to-use contexts (semantic search, RAG retrieval, clustering, deduplication, similarity scoring) plus a worked example with a sample text value. There is no explicit exclusion or routing guidance relative to 'ai_embed', so the boundary with that sibling remains ambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources