Skip to main content
Glama

Text embeddings

embed
Read-only

Embeds 1 to 16 short texts with the fixed Workers AI model @cf/baai/bge-base-en-v1.5 (768 dimensions) for search and clustering. Returns { model, dimensions, count, vectors: number[][] } Price: 3 credits (1 credit = 1 US cent) per successful call; input that does not match the schema is rejected before billing.

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": {
      "inputs": "<inputs>"
    },
    "name": "embed"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes1 to 16 texts, each up to 2000 characters.

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?

Goes well beyond the annotations by disclosing that the model and vector dimension are fixed, the exact response shape, the billing rate of 3 credits per successful call, and that invalid input is rejected before billing. These are exactly the cost and side-effect facts an agent needs before invoking a paid API.

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?

Three compact clauses in one dense paragraph: capability/model first, return shape second, pricing and validation last. No filler and the most decision-relevant facts are front-loaded.

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?

With no output schema present, the description compensates by specifying the exact return object (model, dimensions, count, vectors). Model identity, dimension count, input limits, pricing, and validation behavior complete the picture for a simple one-parameter tool.

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% and the description only restates the same limits (1 to 16 texts, 2000 chars each) already documented in the schema. It adds no new syntax or formatting detail for the single inputs parameter, so the baseline of 3 applies.

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 (embeds) and resource (1-16 short texts) plus the exact backend model and version (@cf/baai/bge-base-en-v1.5, 768 dims). The stated use cases (search and clustering) further distinguish it from sibling utilities like classify or find-similar.

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 clear context for when the tool applies ('for search and clustering') and implies it is a fixed-model embedding service rather than a general text tool. It does not explicitly say when to prefer a sibling such as classify or find-similar, so no exclusion guidance is offered.

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