find_similar_code
Identify similar code snippets within a project by analyzing syntax and structure. Specify a code snippet, language, and similarity threshold to retrieve matching code locations for efficient code comparison and review.
Instructions
Find similar code to a snippet.
Args:
project: Project name
snippet: Code snippet to find
language: Language of the snippet
threshold: Similarity threshold (0.0-1.0)
max_results: Maximum number of results
Returns:
List of similar code locations
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": {
"project": "<project>",
"snippet": "<snippet>"
},
"name": "find_similar_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ||
| max_results | No | ||
| project | Yes | ||
| snippet | Yes | ||
| threshold | No |