Skip to main content
Glama

embed_text

Converts texts into vector embeddings with a DashScope model, letting you write large batch results to a JSON file instead of returning them inline.

Instructions

Embed texts into vectors with a DashScope embedding model.

For more than a couple of texts, pass output_file to write the vectors to a JSON file instead of returning them inline (they are large).

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

Input Schema

NameRequiredDescriptionDefault
modelNotext-embedding-v4
textsYes
dimensionNo
output_fileNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that returned vectors are large and that inline return is only practical for a few texts, but says nothing about authentication, rate limits, model availability, or batch-size constraints for a network-backed embedding call.

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?

Two short sentences with no filler, and the operational advice about output_file is front-loaded after the core purpose statement. Slightly under-specified rather than verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values needn't be described. However, with zero schema description coverage, the unexplained 'dimension' parameter and the lack of any statement about input limits leave meaningful gaps for an agent to call this confidently.

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 0% across four parameters, so the description must compensate. It clarifies the semantics of output_file and touches on the model choice, but leaves 'dimension' and the model default/options unexplained, covering only about half the gap.

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 texts into vectors' with a named provider family ('DashScope embedding model'). This distinguishes it from sibling tools like rerank_documents and semantic_search, though the description never explicitly names those alternatives.

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?

Gives one concrete operational rule: for more than a couple of texts, pass output_file rather than returning vectors inline. It offers no guidance on choosing between this and the sibling retrieval tools (semantic_search, rerank_documents) or on batching limits, so usage context is only partially implied.

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