Skip to main content
Glama

ai_similarity

Read-only

AI semantic similarity — Semantic similarity (cosine, 0-1) between two texts using embeddings, with a label from different to near-duplicate. Pass ?a= and ?b=. Price: $0.004 USDC (Base, via x402).

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "ai_similarity"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYesfirst text
bYessecond text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so safety is covered. The description adds genuinely new behavioral context the annotations cannot convey: the tool is paid ($0.004 USDC on Base via x402) and returns a bounded score plus a categorical label, which matters for cost-aware agent planning.

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?

Two compact sentences with the core semantics, output shape, invocation, and price all front-loaded. The only mild redundancy is restating 'AI semantic similarity' in the title-like lead, which is negligible.

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?

With no output schema, the description usefully discloses both return components (0-1 cosine and a label) and the payment cost, which is the key operational fact for a metered tool. It stops short of noting input size limits, latency, or failure modes, but nothing essential for a correct call is missing.

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%, with both parameters documented as 'first text' and 'second text', so the baseline is 3. The description restates that the two inputs are the texts being compared but adds no ordering, length, language, or formatting constraints beyond the schema, and the '?a= and ?b=' query-string phrasing is slightly at odds with the declared object schema.

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?

The description names a specific operation (cosine semantic similarity between two texts using embeddings) and even characterizes the output range (0-1) and label scale (different to near-duplicate). It is clearly distinguishable from classification or chat siblings, though it does not explicitly contrast itself with ai_embed, which is the nearest conceptual neighbor.

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 named alternative. The only usage instruction is the invocation mechanic 'Pass ?a= and ?b=', which tells the agent how to call it but not when to prefer it over ai_embed or ai_classify.

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