levenshtein_distance
Calculate Levenshtein (edit) distance between two strings.
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": {
"text1": "<text1>",
"text2": "<text2>"
},
"name": "levenshtein_distance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text1 | Yes | First string | |
| text2 | Yes | Second string |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text1 | Yes | First input string | |
| text2 | Yes | Second input string | |
| distance | Yes | Levenshtein edit distance (number of single-character edits) | |
| similarity | Yes | Normalized similarity (0-1, where 1 = identical) | |
| similarity_percent | Yes | Similarity as a percentage (0-100) |