Skip to main content
Glama

jaccard_similarity

Calculate Jaccard similarity between two texts at word or character level to quantify overlap and compare document similarity.

Instructions

Calculate Jaccard similarity index between two texts (word or character level).

Input Schema

NameRequiredDescriptionDefault
modeNo'word' (default) or 'character'.
text_aYesFirst text.
text_bYesSecond text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden, and while it discloses the word/character mode as a behavioral choice, it omits the return value range (0-1), whether it is a pure stateless computation, and any tokenization/case-sensitivity behavior. For a low-risk calculator the gap is modest, but it is not fully disclosed.

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?

A single efficient sentence with the metric and inputs front-loaded and zero waste. Every clause (metric, inputs, mode) earns its place.

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?

The tool is a simple two-input computation with a fully documented schema and no nested objects, so little context is needed. However, with no output schema the description ideally should state what is returned (a 0-1 similarity score), which it does not.

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 100%, so text_a, text_b, and mode are all documented in the schema. The description's phrase 'word or character level' restates the mode parameter without adding syntax or format detail beyond the schema, so the baseline 3 applies.

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 ('Calculate'), a precise named metric ('Jaccard similarity index'), the inputs ('two texts'), and the granularity option ('word or character level'). This clearly distinguishes it from sibling distance/metric tools like edit_distance, hamming_distance, or cosinesim_compare.

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?

The description gives no when-to-use guidance, no conditions that select it over alternatives such as cosinesim_compare or string_distance, and no exclusion criteria. An agent must infer its applicability purely from knowing what Jaccard similarity is.

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

Deploy Server

Other Tools