Skip to main content
Glama

Embed text

embed

Embed up to 32 strings (8000 characters each) with Workers AI. Default model @cf/baai/bge-m3. Also @cf/google/embeddinggemma-300m. Stops with budget_exhausted before it can use the neurons reserved for /v1/ask.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional. @cf/baai/bge-m3 or @cf/google/embeddinggemma-300m.
textsYes1 to 32 strings.

Output Schema

NameRequiredDescriptionDefault
okNo
errorNo
modelNo
embeddingsNo
budget_remainingNo
estimated_neuronsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it discloses batch and per-string size limits, the default model, an alternate model, and a specific failure mode (budget_exhausted before consuming neurons reserved for /v1/ask). It does not cover auth, rate limits, or partial-failure behavior, but the budget caveat is unusually informative.

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?

Four short sentences, front-loaded with the core action and limits. Slight redundancy with the schema's model enumeration, but every sentence adds at least one new fact.

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 two-parameter tool with an output schema, the key facts an agent needs (size caps, default and alternate model, budget failure mode) are present. Only secondary details such as embedding dimensions or partial-batch failure handling are absent, and the output schema likely covers the return shape.

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 meaning beyond the schema: it names the default model (@cf/baai/bge-m3), which the schema only marks as optional, and supplies the 8000-character per-string cap that the schema's '1 to 32 strings' omits.

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?

States a specific verb and resource (embed strings with Workers AI) plus concrete limits of 32 strings at 8000 characters. It is clearly distinguishable from siblings like rerank or ask, though it never explicitly names the nearest alternative (rerank) to contrast against.

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

Usage Guidelines3/5

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

Usage context is implied by the model list and the budget note relative to /v1/ask, but there is no explicit 'use this when' or exclusion statement telling an agent when to pick embed over rerank or ask.

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