calculate-metrics
Analyze code by calculating specific metrics such as complexity, lines of code, and maintainability. Supports direct code input or repository URLs for multiple programming languages.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
fileContent | No | Source code content to analyze directly instead of from a repository | |
filePath | No | Path to the file within the repository (e.g., 'src/main.ts') | |
language | No | Programming language of the code (e.g., 'javascript', 'python', 'typescript', 'rust') | |
metrics | No | Specific metrics to calculate, such as 'complexity', 'linesOfCode', 'maintainability', 'functions', 'classes' | |
repositoryUrl | No | URL of the repository to analyze (e.g., 'https://github.com/username/repo') |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"fileContent": {
"description": "Source code content to analyze directly instead of from a repository",
"type": "string"
},
"filePath": {
"description": "Path to the file within the repository (e.g., 'src/main.ts')",
"type": "string"
},
"language": {
"description": "Programming language of the code (e.g., 'javascript', 'python', 'typescript', 'rust')",
"type": "string"
},
"metrics": {
"description": "Specific metrics to calculate, such as 'complexity', 'linesOfCode', 'maintainability', 'functions', 'classes'",
"items": {
"type": "string"
},
"type": "array"
},
"repositoryUrl": {
"description": "URL of the repository to analyze (e.g., 'https://github.com/username/repo')",
"type": "string"
}
},
"type": "object"
}