Skip to main content
Glama
TextLite MCP Server

TextLite MCP Server

Official
by Mantri-AI

Semantic Similarity

semantic_similarity

Measures semantic similarity between two texts by returning their cosine similarity score, so you can compare meaning and detect near-duplicate content.

Instructions

Return the cosine similarity (-1 to 1) between two locally embedded texts.

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": {
      "text_a": "<text_a>",
      "text_b": "<text_b>"
    },
    "name": "semantic_similarity"
  }
}

Input Schema

NameRequiredDescriptionDefault
text_aYes
text_bYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two useful behaviors: the output is a cosine similarity bounded to -1 to 1, and the texts are embedded locally (implying no external embedding service). It omits determinism, which embedding model is used, behavior on empty/oversized input, and cost/latency characteristics.

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 front-loaded sentence with no redundant wording, and the result range is placed prominently. The phrase 'locally embedded' is slightly ambiguous about whether the caller supplies embeddings or the tool creates them.

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-value explanation is correctly omitted, and for a two-string similarity primitive the description covers the essentials. However, with no annotations and zero schema descriptions, it leaves the agent without any grounding on model, limits, or failure modes.

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%, so the description must compensate; 'two locally embedded texts' does clarify that text_a and text_b are raw strings the tool embeds rather than pre-computed vectors, which is meaningful. It says nothing about ordering, symmetry of the comparison, or maximum input size, so the compensation is only partial.

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?

Names a specific verb and result ('Return the cosine similarity') plus the operand ('two locally embedded texts') and even the output range (-1 to 1). It is clearly distinct from siblings such as semantic_search or rerank_passages, though it never explicitly contrasts with them.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives; the agent must infer that this is the pairwise-comparison tool rather than a search or ranking tool. Nothing states prerequisites such as language support, text length limits, or whether embedding happens per call.

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