Skip to content

Commit f971979

Browse files
authored
Merge pull request modelcontextprotocol#1588 from jonathanhefner/contributing-schema-changes
Update contributing instructions for schema changes
2 parents 2159a44 + 685c8c0 commit f971979

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,38 @@ The following software is required to work on the spec:
1818
### Getting Started
1919

2020
1. [Fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
21+
2122
2. Clone your fork:
2223

23-
```bash
24-
git clone https://github.com/YOUR-USERNAME/modelcontextprotocol.git
25-
cd modelcontextprotocol
26-
```
24+
```bash
25+
git clone https://github.com/YOUR-USERNAME/modelcontextprotocol.git
26+
cd modelcontextprotocol
27+
```
2728

2829
3. Install dependencies:
2930

30-
```bash
31-
nvm install # install correct Node version
32-
npm install # install dependencies
33-
```
31+
```bash
32+
nvm install # install correct Node version
33+
npm install # install dependencies
34+
```
3435

35-
## Schema changes
36+
4. Create a new branch:
3637

37-
Note that schema changes are made to `schema.ts`, and `schema.json` is generated from
38-
`schema.ts`.
38+
```bash
39+
git checkout -b feature/your-feature-name
40+
```
3941

40-
1. Create a new branch:
42+
## Schema changes
43+
44+
Schema changes go in `schema/draft/schema.ts`. To validate your changes, run:
4145

4246
```bash
43-
git checkout -b feature/your-feature-name
47+
npm run check:schema:ts
4448
```
4549

46-
2. Make your changes.
47-
48-
3. Validate schema changes and generate `schema.json`:
50+
`schema/draft/schema.json` and `docs/specification/draft/schema.mdx` are generated from `schema/draft/schema.ts`; do not edit them directly. To generate them, run:
4951

5052
```bash
51-
npm run check:schema:ts
5253
npm run generate:schema
5354
```
5455

0 commit comments

Comments
 (0)