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
Input Schema
Name | Required | Description | Default |
---|---|---|---|
language | No | ||
max_results | No | ||
project | Yes | ||
snippet | Yes | ||
threshold | No |
Input Schema (JSON Schema)
{
"properties": {
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Language"
},
"max_results": {
"default": 10,
"title": "Max Results",
"type": "integer"
},
"project": {
"title": "Project",
"type": "string"
},
"snippet": {
"title": "Snippet",
"type": "string"
},
"threshold": {
"default": 0.8,
"title": "Threshold",
"type": "number"
}
},
"required": [
"project",
"snippet"
],
"title": "find_similar_codeArguments",
"type": "object"
}