Skip to main content
Glama

Text embeddings (bge-m3, 1024-d, multilingual) + semantic search ranking

ai_embed
Read-only

Embed 1-32 texts (each up to 4,000 chars) with BAAI bge-m3 (multilingual, MIT) on our Cloudflare Worker via Workers AI. Add query= to also get the texts ranked by cosine similarity (a cheap semantic search / rerank step); include_vectors=false returns only the ranking. Limited daily capacity: 503 (not charged) when used up. Price: $0.0005 USDC on Base per call, paid with x402 (MCP transport: an unpaid call returns the x402 PaymentRequired object; retry with params._meta["x402/payment"]). Same tool over HTTP: POST /api/ai/embed.

Input Schema

NameRequiredDescriptionDefault
queryNooptional; rank texts against it
textsYes1-32 strings (or text= for one)
include_vectorsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say read-only/open-world/not-idempotent, but the description adds rate limits (daily capacity, 503 when exhausted and not charged), pricing ($0.0005 USDC on Base per call), the full x402 payment handshake including the retry via params._meta["x402/payment"], and an equivalent HTTP endpoint. That is substantial operational context an agent cannot get from the annotations.

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?

Front-loaded with the core action and its limits, then payment/logistics detail. It is a single dense paragraph with heavy parentheticals that slightly impede scanning, but nearly every clause carries actionable 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?

Covers input limits, ranking semantics, cost, and failure modes for a 3-parameter tool with no output schema. The one remaining gap is the response shape — what the vectors/ranking payload looks like (vector dimensionality only appears in the title, and ranking field names are unstated).

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 67%, and the description compensates by explaining what query does semantically (ranks texts by cosine similarity) and what include_vectors=false means, a parameter the schema documents only as an enum. Batching bounds (1-32 texts, 4,000 chars) are also restated usefully.

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?

States a specific verb (Embed) and resource (1-32 texts) plus the exact model (BAAI bge-m3), batching and length limits, and an alternate mode (rank by cosine similarity with query=). This clearly separates it from siblings like ai_classify, ai_extract, and ai_image without opening any schema.

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?

Gives concrete usage context: add query= for a 'cheap semantic search / rerank step', and set include_vectors=false to get only the ranking. It does not name an alternative sibling or state explicit exclusions, so the routing guidance is clear but not exhaustive.

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