Skip to content

Commit 76b458e

Browse files
committed
feat(angular-toolkit-mcp): improve schemas
1 parent 8b22cfb commit 76b458e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/angular-mcp-server/src/lib/tools/ds/report-violations/report-all-violations.tool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ interface ReportAllViolationsOptions extends BaseHandlerOptions {
3333
export const reportAllViolationsSchema = {
3434
name: 'report-all-violations',
3535
description:
36-
'Scan a directory for deprecated design system CSS classes defined in the config at `deprecatedCssClassesPath`, and output a usage report',
36+
'Scan a directory for all deprecated design system CSS classes and output a comprehensive violation report. Use this to discover all violations across multiple components. Output can be grouped by component (default) or by file, and includes: file paths, line numbers, violation details, and replacement suggestions (which component should be used instead). This is ideal for getting an overview of all violations in a directory.',
3737
inputSchema: createProjectAnalysisSchema({
3838
groupBy: {
3939
type: 'string',
4040
enum: ['component', 'file'],
41-
description: 'How to group the results: "component" groups by design system component, "file" groups by file path',
41+
description: 'How to group the results: "component" (default) groups by design system component showing all files affected by each component, "file" groups by file path showing all components violated in each file',
4242
default: 'component',
4343
},
4444
}),

packages/angular-mcp-server/src/lib/tools/ds/report-violations/report-violations.tool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface ReportViolationsOptions extends BaseHandlerOptions {
1919

2020
export const reportViolationsSchema = {
2121
name: 'report-violations',
22-
description: `Report deprecated DS CSS usage in a directory with configurable grouping format.`,
22+
description: `Report deprecated CSS usage for a specific design system component in a directory. Returns violations grouped by file, showing which deprecated classes are used and where. Use this when you know which component you're checking for. Output includes: file paths, line numbers, and violation details (but not replacement suggestions since the component is already known).`,
2323
inputSchema: createViolationReportingSchema(),
2424
annotations: {
2525
title: 'Report Violations',

packages/angular-mcp-server/src/lib/tools/ds/shared/models/schema-helpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ export const COMMON_SCHEMA_PROPERTIES = {
88
directory: {
99
type: 'string' as const,
1010
description:
11-
'The relative path to the directory (starting with "./path/to/dir") to scan. Respect the OS specifics.',
11+
'The relative path to the directory (starting with "./path/to/dir") to scan. Respect the OS specifics. Should point to the directory containing the files you want to analyze for violations.',
1212
},
1313

1414
componentName: {
1515
type: 'string' as const,
16-
description: 'The class name of the component (e.g., DsButton)',
16+
description: 'The class name of the design system component to check for violations (e.g., DsButton, DsBadge, DsCard). This should be the TypeScript class name, not the selector.',
1717
},
1818

1919
groupBy: {
2020
type: 'string' as const,
2121
enum: ['file', 'folder'] as const,
22-
description: 'How to group the results',
22+
description: 'How to group the violation results in the output. "file" groups violations by individual file paths, "folder" groups by directory structure.',
2323
default: 'file' as const,
2424
},
2525
} as const;

0 commit comments

Comments
 (0)