@codacy/codacy-mcp 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import { generalOrganizationMistakes, generalRepositoryMistakes } from '../rules.js';
|
|
1
2
|
import { fileSchema, toolNames } from '../schemas.js';
|
|
3
|
+
import { listFilesTool } from './listFilesTool.js';
|
|
4
|
+
const rules = `
|
|
5
|
+
If a file is ignored, it is not analyzed by Codacy.
|
|
6
|
+
Using this tool you'll get results for five metrics: Grade, Issues, Duplication, Complexity and Coverage.
|
|
7
|
+
|
|
8
|
+
Common use cases:
|
|
9
|
+
- When the user asks for the analysis results of a specific file.
|
|
10
|
+
|
|
11
|
+
Common mistakes:
|
|
12
|
+
- Using this tool with the wrong fileId. You can get the fileId by using the ${listFilesTool.name} tool with this file name as the search parameter.
|
|
13
|
+
${generalOrganizationMistakes}
|
|
14
|
+
${generalRepositoryMistakes}
|
|
15
|
+
`;
|
|
2
16
|
export const getFileWithAnalysisTool = {
|
|
3
17
|
name: toolNames.CODACY_GET_FILE_WITH_ANALYSIS,
|
|
4
|
-
description:
|
|
18
|
+
description: `Use this tool to get information for a file and it's analysis information and coverage metrics. \n ${rules}`,
|
|
5
19
|
inputSchema: {
|
|
6
20
|
type: 'object',
|
|
7
21
|
properties: {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { toolNames } from '../schemas.js';
|
|
2
|
+
const rules = `
|
|
3
|
+
Common use cases:
|
|
4
|
+
- When the user asks for the definition of a specific pattern
|
|
5
|
+
- When the user asks for more information about an issue found by Codacy
|
|
6
|
+
|
|
7
|
+
Common mistakes:
|
|
8
|
+
- Using this tool with the wrong toolUuid
|
|
9
|
+
- Using this tool with the wrong patternId
|
|
10
|
+
`;
|
|
2
11
|
export const getPatternTool = {
|
|
3
12
|
name: toolNames.CODACY_GET_PATTERN,
|
|
4
|
-
description:
|
|
13
|
+
description: `Get the definition of a specific pattern. \n ${rules}`,
|
|
5
14
|
inputSchema: {
|
|
6
15
|
type: 'object',
|
|
7
16
|
properties: {
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import { generalOrganizationMistakes, generalRepositoryMistakes } from '../rules.js';
|
|
1
2
|
import { repositorySchema, toolNames } from '../schemas.js';
|
|
3
|
+
const rules = `
|
|
4
|
+
Common use cases:
|
|
5
|
+
- When the user asks for the coverage of the files in a specific pull request
|
|
6
|
+
|
|
7
|
+
Common mistakes:
|
|
8
|
+
- Using this tool for a specific file. For specific file coverage, use the ${toolNames.CODACY_GET_FILE_WITH_ANALYSIS} tool instead.
|
|
9
|
+
${generalOrganizationMistakes}
|
|
10
|
+
${generalRepositoryMistakes}
|
|
11
|
+
`;
|
|
2
12
|
export const getRepositoryPullRequestFilesCoverageTool = {
|
|
3
13
|
name: toolNames.CODACY_GET_REPOSITORY_PULL_REQUEST_FILES_COVERAGE,
|
|
4
|
-
description:
|
|
14
|
+
description: `Use this tool to get coverage information for all files in a pull request. \n ${rules}`,
|
|
5
15
|
inputSchema: {
|
|
6
16
|
type: 'object',
|
|
7
17
|
properties: {
|
|
@@ -7,6 +7,7 @@ const rules = `
|
|
|
7
7
|
Common use cases:
|
|
8
8
|
- When the user asks for the issues for a specific file
|
|
9
9
|
- When the user is in a file context and asks for the issues
|
|
10
|
+
- When the user asks if a specific file has issues
|
|
10
11
|
|
|
11
12
|
Common mistakes:
|
|
12
13
|
- Using this tool for listing the issues for specific pull requests
|