Skip to main content
Glama

Turn text into vectors

embed
Read-onlyIdempotent

Embeds one text or up to 64 through POST /v1/embeddings with an embedding model id from list_models (type embedding) and returns one vector per text, in order, with the token usage and the charge. Billed to the key in the MCP request's Authorization header.

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

Input Schema

NameRequiredDescriptionDefault
inputYesOne text, or up to 64 texts, to embed.
modelYesAn embedding model id from list_models (type embedding).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description adds non-obvious behavior: a hard batch ceiling of 64, per-text result ordering, inclusion of token usage, and billing charged to the key in the MCP request's Authorization header. The billing disclosure in particular is information an agent cannot get from structured fields.

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?

A single dense sentence that front-loads the core action and constraint, with no filler. It is slightly overpacked, folding return shape, model sourcing, and billing into one run-on clause, and repeats the model-id hint already in the schema.

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?

There is no output schema, and the description compensates by describing the return payload (vectors in input order, token usage, charge). With only two required parameters and full schema coverage, an agent has everything needed to call this correctly.

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 coverage is 100% and both parameters already carry descriptions, so the schema does the heavy lifting. The description restates the 64-item ceiling and the model source, adding only the ordering guarantee that vector i corresponds to input i, which is marginal param-level value.

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 and resource ('Embeds one text or up to 64'), names the underlying endpoint and the model source, and specifies the return shape (one vector per text, in order). This is unmistakably distinct from siblings such as chat, rerank, or search.

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 actionable direction by pointing at list_models restricted to type embedding for the model id, which is real routing guidance. It does not say when to prefer embed over alternatives like rerank or search, so it stops short of full when/when-not coverage.

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.