@regle/mcp-server 1.14.0-beta.1 → 1.14.0-beta.3
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.
- package/README.md +0 -74
- package/dist/regle-mcp-server.js +1749 -393
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
MCP (Model Context Protocol) Server for [Regle](https://reglejs.dev) - providing AI-powered assistance for Vue.js form validation.
|
|
4
4
|
|
|
5
|
-
## What is MCP?
|
|
6
|
-
|
|
7
|
-
The [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) is an open protocol that enables AI assistants to interact with external tools and resources. This server provides Regle-specific tools and documentation to help AI assistants better understand and generate Regle validation code.
|
|
8
|
-
|
|
9
5
|
## Installation
|
|
10
6
|
|
|
11
7
|
```bash
|
|
@@ -51,76 +47,6 @@ Add to your MCP settings:
|
|
|
51
47
|
}
|
|
52
48
|
```
|
|
53
49
|
|
|
54
|
-
## Available Tools
|
|
55
|
-
|
|
56
|
-
### `get_rule_info`
|
|
57
|
-
|
|
58
|
-
Get detailed information about a specific Regle validation rule.
|
|
59
|
-
|
|
60
|
-
**Parameters:**
|
|
61
|
-
- `ruleName` (string): The name of the rule (e.g., "required", "email", "minLength")
|
|
62
|
-
|
|
63
|
-
**Example:**
|
|
64
|
-
```
|
|
65
|
-
Get info about the "email" rule
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### `search_rules`
|
|
69
|
-
|
|
70
|
-
Search for Regle validation rules by name or description.
|
|
71
|
-
|
|
72
|
-
**Parameters:**
|
|
73
|
-
- `query` (string): Search query
|
|
74
|
-
|
|
75
|
-
**Example:**
|
|
76
|
-
```
|
|
77
|
-
Search for rules related to "length"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### `list_rules`
|
|
81
|
-
|
|
82
|
-
List all available built-in Regle validation rules.
|
|
83
|
-
|
|
84
|
-
### `generate_form_validation`
|
|
85
|
-
|
|
86
|
-
Generate a Vue component with Regle form validation based on field definitions.
|
|
87
|
-
|
|
88
|
-
**Parameters:**
|
|
89
|
-
- `fields` (array): Array of field definitions with:
|
|
90
|
-
- `name` (string): Field name
|
|
91
|
-
- `type` (string): Field type (string, number, boolean, date, email, url, password, array)
|
|
92
|
-
- `required` (boolean, optional): Whether the field is required
|
|
93
|
-
- `minLength` (number, optional): Minimum length
|
|
94
|
-
- `maxLength` (number, optional): Maximum length
|
|
95
|
-
- `min` (number, optional): Minimum value (for numbers)
|
|
96
|
-
- `max` (number, optional): Maximum value (for numbers)
|
|
97
|
-
- `componentName` (string, optional): Name of the component
|
|
98
|
-
|
|
99
|
-
**Example:**
|
|
100
|
-
```
|
|
101
|
-
Generate a login form with email and password fields
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### `generate_custom_rule`
|
|
105
|
-
|
|
106
|
-
Generate a custom Regle validation rule.
|
|
107
|
-
|
|
108
|
-
**Parameters:**
|
|
109
|
-
- `ruleName` (string): Name of the custom rule
|
|
110
|
-
- `async` (boolean, optional): Whether the rule is async
|
|
111
|
-
- `hasParams` (boolean, optional): Whether the rule accepts parameters
|
|
112
|
-
- `paramName` (string, optional): Name of the parameter
|
|
113
|
-
- `paramType` (string, optional): Type of the parameter
|
|
114
|
-
- `errorMessage` (string): Error message when validation fails
|
|
115
|
-
|
|
116
|
-
## Available Resources
|
|
117
|
-
|
|
118
|
-
The server provides documentation resources that AI assistants can read:
|
|
119
|
-
|
|
120
|
-
- `regle://docs/introduction` - Introduction to Regle
|
|
121
|
-
- `regle://docs/core-concepts` - Understanding useRegle
|
|
122
|
-
- `regle://docs/built-in-rules` - Built-in rules reference
|
|
123
|
-
- `regle://docs/validation-properties` - Validation properties reference
|
|
124
50
|
|
|
125
51
|
## Development
|
|
126
52
|
|