Skip to content

Commit c243260

Browse files
committed
refactor(tools): remove componentSchemas tool
* docs, removal notes for componentSchemas * tool.componentSchemas, removal, integrated into mcp resources, tools * testing, for search, usePatternFly refined to callout schemas
1 parent 083adc0 commit c243260

12 files changed

Lines changed: 128 additions & 469 deletions

docs/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Fetch full documentation and component JSON schemas for specific PatternFly URLs
5757
#### ~~Tool: fetchDocs~~ (Removed)
5858
> "fetchDocs" has been integrated into "usePatternFlyDocs."
5959
60-
#### ~~Tool: componentSchemas~~ (Deprecated)
61-
> "componentSchemas" has been integrated into "usePatternFlyDocs."
60+
#### ~~Tool: componentSchemas~~ (Removed)
61+
> "componentSchemas" has been integrated into "usePatternFlyDocs" and MCP resources.
6262
6363
## Built-in resources
6464

src/__tests__/__snapshots__/server.test.ts.snap

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ exports[`runServer should allow server to be stopped, http stop server: diagnost
4848
[
4949
"Registered tool: searchPatternFlyDocs",
5050
],
51-
[
52-
"Registered tool: componentSchemas",
53-
],
5451
[
5552
"test-server server running on HTTP transport",
5653
],
@@ -113,9 +110,6 @@ exports[`runServer should allow server to be stopped, stdio stop server: diagnos
113110
[
114111
"Registered tool: searchPatternFlyDocs",
115112
],
116-
[
117-
"Registered tool: componentSchemas",
118-
],
119113
[
120114
"test-server server running on stdio transport",
121115
],
@@ -643,9 +637,6 @@ exports[`runServer should attempt to run server, use default tools, http: diagno
643637
[
644638
"Registered tool: searchPatternFlyDocs",
645639
],
646-
[
647-
"Registered tool: componentSchemas",
648-
],
649640
[
650641
"test-server-2 server running on HTTP transport",
651642
],
@@ -676,7 +667,6 @@ exports[`runServer should attempt to run server, use default tools, http: diagno
676667
"registerTool": [
677668
"usePatternFlyDocs",
678669
"searchPatternFlyDocs",
679-
"componentSchemas",
680670
],
681671
}
682672
`;
@@ -729,9 +719,6 @@ exports[`runServer should attempt to run server, use default tools, stdio: diagn
729719
[
730720
"Registered tool: searchPatternFlyDocs",
731721
],
732-
[
733-
"Registered tool: componentSchemas",
734-
],
735722
[
736723
"test-server-1 server running on stdio transport",
737724
],
@@ -762,7 +749,6 @@ exports[`runServer should attempt to run server, use default tools, stdio: diagn
762749
"registerTool": [
763750
"usePatternFlyDocs",
764751
"searchPatternFlyDocs",
765-
"componentSchemas",
766752
],
767753
}
768754
`;

src/__tests__/__snapshots__/tool.componentSchemas.test.ts.snap

Lines changed: 0 additions & 173 deletions
This file was deleted.

src/__tests__/__snapshots__/tool.patternFlyDocs.test.ts.snap

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,34 @@ exports[`usePatternFlyDocsTool, callback should attempt to parse parameters, wit
1919
exports[`usePatternFlyDocsTool, callback should have a specific markdown format: Button 1`] = `
2020
[
2121
{
22-
"text": "# Content for components/ipsumButton.md
22+
"text": "# Documentation for Button (v6) [undefined]
23+
Source: components/loremButton.md
24+
25+
lorem documentation content
26+
27+
---
28+
29+
# Content for components/ipsumButton.md
2330
Source: components/ipsumButton.md
2431
2532
ipsum documentation content
2633
2734
---
2835
29-
# Content for components/loremButton.md
30-
Source: components/loremButton.md
31-
32-
lorem documentation content",
36+
# Component Schema for button (v6)
37+
This machine-readable JSON schema defines the component's props, types, and validation rules.
38+
\`\`\`json
39+
{
40+
"$schema": "http://json-schema.org/draft-07/schema#",
41+
"title": "Button",
42+
"type": "object",
43+
"properties": {
44+
"variant": {
45+
"type": "string"
46+
}
47+
}
48+
}
49+
\`\`\`",
3350
"type": "text",
3451
},
3552
]

src/__tests__/__snapshots__/tool.searchPatternFlyDocs.test.ts.snap

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,19 @@ exports[`searchPatternFlyDocsTool should have a consistent return structure: str
88
}
99
`;
1010

11-
exports[`searchPatternFlyDocsTool, callback should have a specific markdown format: tooltip 1`] = `
11+
exports[`searchPatternFlyDocsTool, callback should have a specific markdown format: Button 1`] = `
1212
[
1313
{
14-
"text": "# Search results for PatternFly version "v6" and "button". Showing 2 exact matches.
14+
"text": "# Search results for PatternFly version "v6" and "button". Showing 1 exact match.
1515
1. **button**:
1616
"usePatternFlyDocs" resource parameter "name" and "URLs"
1717
- **Name**: button
1818
- **URLs**:
19-
- [Button - (v6) - Design Guidelines for the button component.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/components/button/button.md)
20-
- [Button - (v6) - Accessibility for the button component.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/components/accessibility/button/button.md)
21-
- [Button - (v6) - Examples for the button component.](https://raw.githubusercontent.com/patternfly/patternfly-react/476782a298df81cb78de7f3cd804f3ff8f33993c/packages/react-core/src/components/Button/examples/Button.md)
19+
- [Button - (v6) - Design Guidelines](https://pf.org/button.md)
2220
- **Resources**:
2321
- **URI**: patternfly://docs/button?version=v6
2422
- **JSON Schemas**: patternfly://schemas/button?version=v6
2523
26-
2. **patterns**:
27-
"usePatternFlyDocs" resource parameter "name" and "URLs"
28-
- **Name**: patterns
29-
- **URLs**:
30-
- [Actions - (v6) - The best practices for designing processes that a user can trigger by clicking or selecting a UI element, such as a button or link.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/actions/actions.md)
31-
- [Bulk selection - (v6) - A defined method for users to select or deselect multiple items within complex content views or data tables.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/bulk-selection/bulk-selection.md)
32-
- [Card view - (v6) - A structured layout designed to display a grid of cards in a gallery, optimizing for browsing and interaction.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/card-view/card-view.md)
33-
- [Component usage and behavior - (v6) - Guidance on how to choose between similar components and use them appropriately based on specific user contexts and use cases.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/usage-and-behavior.md)
34-
- [Dashboard - (v6) - A highly customizable layout that serves as a high-level overview of key metrics or performance indicators.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/dashboard/dashboard.md)
35-
- [Filters - (v6) - The design rules for implementing filtering mechanisms that allow users to narrow down content from large datasets or complex views.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/filters/filters.md)
36-
- [Primary-detail - (v6) - A two-pane layout that shows a list of items and corresponding details for the currently selected item.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/primary-detail/primary-detail.md)
37-
- [Status and severity - (v6) - Guidance on the consistent and accessible use of color and iconography to communicate status and severity across the UI.](https://raw.githubusercontent.com/patternfly/patternfly-org/2d5fec39ddb8aa32ce78c9a63cdfc1653692b193/packages/documentation-site/patternfly-docs/content/patterns/status-and-severity/status-and-severity.md)
38-
- **Resources**:
39-
- **URI**: patternfly://docs/patterns?version=v6
40-
4124
4225
4326
---
@@ -50,3 +33,7 @@ exports[`searchPatternFlyDocsTool, callback should have a specific markdown form
5033
},
5134
]
5235
`;
36+
37+
exports[`searchPatternFlyDocsTool, callback should parse parameters, exact match 1`] = `"# Search results for PatternFly version "v6" and "button". Showing 1 exact match."`;
38+
39+
exports[`searchPatternFlyDocsTool, callback should parse parameters, wildcard search 1`] = `"# Search results for PatternFly version "v6" and "all" resources. Only showing the first 1 results. There are 50 potential match variations. Try searching with a more specific query."`;

0 commit comments

Comments
 (0)