Skip to content

Commit cb9c317

Browse files
authored
Introduce lifecycle MCP schemas in /self (#860)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 9fb855c commit cb9c317

111 files changed

Lines changed: 16350 additions & 4143 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

enterprise/e2e/html/hurl/list.hurl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ header "Last-Modified" exists
1212
jsonpath "$.path" == "/"
1313
jsonpath "$.url" == "{{base}}"
1414
jsonpath "$.breadcrumb" count == 0
15-
jsonpath "$.schemas" == 14
15+
jsonpath "$.schemas" == 23
1616
jsonpath "$.entries" count == 2
1717
jsonpath "$.entries[0].name" == "self"
1818
jsonpath "$.entries[0].title" == "Self"
1919
jsonpath "$.entries[0].description" == "The schemas that define the current version of this instance"
2020
jsonpath "$.entries[0].type" == "directory"
2121
jsonpath "$.entries[0].health" == 100
22-
jsonpath "$.entries[0].schemas" == 13
22+
jsonpath "$.entries[0].schemas" == 22
2323
jsonpath "$.entries[0].path" == "/self/"
2424
jsonpath "$.entries[1].name" == "test"
2525
jsonpath "$.entries[1].type" == "directory"

src/self/v1/schemas/mcp/error.json

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Sourcemeta One MCP Error Response",
4+
"description": "The error response Sourcemeta One returns when an MCP request fails",
5+
"examples": [
6+
{
7+
"jsonrpc": "2.0",
8+
"id": null,
9+
"error": {
10+
"code": -32700,
11+
"message": "Parse error"
12+
}
13+
},
14+
{
15+
"jsonrpc": "2.0",
16+
"id": 1,
17+
"error": {
18+
"code": -32602,
19+
"message": "Invalid params"
20+
}
21+
},
22+
{
23+
"jsonrpc": "2.0",
24+
"id": 2,
25+
"error": {
26+
"code": 1,
27+
"message": "Enterprise edition required",
28+
"data": "MCP support is only available in the Enterprise edition of Sourcemeta One"
29+
}
30+
}
31+
],
32+
"type": "object",
33+
"required": [ "jsonrpc", "id", "error" ],
34+
"properties": {
35+
"jsonrpc": {
36+
"const": "2.0"
37+
},
38+
"id": {
39+
"type": [ "string", "integer", "null" ]
40+
},
41+
"error": {
42+
"anyOf": [
43+
{
44+
"$ref": "#/$defs/reserved"
45+
},
46+
{
47+
"type": "object",
48+
"required": [ "code", "message", "data" ],
49+
"properties": {
50+
"code": {
51+
"const": 1
52+
},
53+
"message": {
54+
"const": "Enterprise edition required"
55+
},
56+
"data": {
57+
"type": "string"
58+
}
59+
},
60+
"additionalProperties": false
61+
}
62+
]
63+
}
64+
},
65+
"additionalProperties": false,
66+
"$defs": {
67+
"reserved": {
68+
"anyOf": [
69+
{
70+
"type": "object",
71+
"required": [ "code", "message" ],
72+
"properties": {
73+
"code": {
74+
"const": -32700
75+
},
76+
"message": {
77+
"const": "Parse error"
78+
}
79+
},
80+
"additionalProperties": false
81+
},
82+
{
83+
"type": "object",
84+
"required": [ "code", "message" ],
85+
"properties": {
86+
"code": {
87+
"const": -32600
88+
},
89+
"message": {
90+
"const": "Invalid Request"
91+
}
92+
},
93+
"additionalProperties": false
94+
},
95+
{
96+
"type": "object",
97+
"required": [ "code", "message" ],
98+
"properties": {
99+
"code": {
100+
"const": -32601
101+
},
102+
"message": {
103+
"const": "Method not found"
104+
}
105+
},
106+
"additionalProperties": false
107+
},
108+
{
109+
"type": "object",
110+
"required": [ "code", "message" ],
111+
"properties": {
112+
"code": {
113+
"const": -32602
114+
},
115+
"message": {
116+
"const": "Invalid params"
117+
}
118+
},
119+
"additionalProperties": false
120+
},
121+
{
122+
"type": "object",
123+
"required": [ "code", "message" ],
124+
"properties": {
125+
"code": {
126+
"const": -32603
127+
},
128+
"message": {
129+
"const": "Internal error"
130+
}
131+
},
132+
"additionalProperties": false
133+
}
134+
]
135+
}
136+
}
137+
}
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Sourcemeta One MCP Initialize Request",
4+
"description": "Connection handshake from a client",
5+
"examples": [
6+
{
7+
"jsonrpc": "2.0",
8+
"id": 1,
9+
"method": "initialize",
10+
"params": {
11+
"protocolVersion": "2025-11-25",
12+
"capabilities": {
13+
"roots": {
14+
"listChanged": true
15+
},
16+
"sampling": {}
17+
},
18+
"clientInfo": {
19+
"name": "claude-code",
20+
"version": "1.0.0"
21+
}
22+
}
23+
}
24+
],
25+
"type": "object",
26+
"required": [ "jsonrpc", "id", "method", "params" ],
27+
"properties": {
28+
"jsonrpc": {
29+
"const": "2.0"
30+
},
31+
"id": {
32+
"type": [ "string", "integer" ]
33+
},
34+
"method": {
35+
"const": "initialize"
36+
},
37+
"params": {
38+
"type": "object",
39+
"required": [ "protocolVersion", "capabilities", "clientInfo" ],
40+
"properties": {
41+
"_meta": {
42+
"type": "object",
43+
"properties": {
44+
"progressToken": {
45+
"type": [ "string", "integer" ]
46+
}
47+
}
48+
},
49+
"protocolVersion": {
50+
"type": "string"
51+
},
52+
"capabilities": {
53+
"type": "object",
54+
"properties": {
55+
"roots": {
56+
"type": "object",
57+
"properties": {
58+
"listChanged": {
59+
"type": "boolean"
60+
}
61+
}
62+
},
63+
"sampling": {
64+
"type": "object",
65+
"properties": {
66+
"context": {
67+
"type": "object"
68+
},
69+
"tools": {
70+
"type": "object"
71+
}
72+
}
73+
},
74+
"elicitation": {
75+
"type": "object",
76+
"properties": {
77+
"form": {
78+
"type": "object"
79+
},
80+
"url": {
81+
"type": "object"
82+
}
83+
}
84+
},
85+
"tasks": {
86+
"type": "object",
87+
"properties": {
88+
"cancel": {
89+
"type": "object"
90+
},
91+
"list": {
92+
"type": "object"
93+
},
94+
"requests": {
95+
"type": "object",
96+
"properties": {
97+
"elicitation": {
98+
"type": "object",
99+
"properties": {
100+
"create": {
101+
"type": "object"
102+
}
103+
}
104+
},
105+
"sampling": {
106+
"type": "object",
107+
"properties": {
108+
"createMessage": {
109+
"type": "object"
110+
}
111+
}
112+
}
113+
}
114+
}
115+
}
116+
},
117+
"experimental": {
118+
"type": "object",
119+
"additionalProperties": {
120+
"type": "object"
121+
}
122+
}
123+
}
124+
},
125+
"clientInfo": {
126+
"type": "object",
127+
"required": [ "name", "version" ],
128+
"properties": {
129+
"name": {
130+
"type": "string"
131+
},
132+
"version": {
133+
"type": "string"
134+
},
135+
"title": {
136+
"type": "string"
137+
},
138+
"description": {
139+
"type": "string"
140+
},
141+
"websiteUrl": {
142+
"type": "string",
143+
"format": "uri"
144+
},
145+
"icons": {
146+
"type": "array",
147+
"items": {
148+
"type": "object",
149+
"required": [ "src" ],
150+
"properties": {
151+
"src": {
152+
"type": "string",
153+
"format": "uri"
154+
},
155+
"mimeType": {
156+
"type": "string"
157+
},
158+
"sizes": {
159+
"type": "array",
160+
"items": {
161+
"type": "string"
162+
}
163+
},
164+
"theme": {
165+
"enum": [ "dark", "light" ]
166+
}
167+
}
168+
}
169+
}
170+
}
171+
}
172+
}
173+
}
174+
}
175+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "Sourcemeta One MCP Initialize Response",
4+
"description": "Sourcemeta One's response to a client's initialization",
5+
"examples": [
6+
{
7+
"jsonrpc": "2.0",
8+
"id": 1,
9+
"result": {
10+
"protocolVersion": "2025-11-25",
11+
"capabilities": {},
12+
"serverInfo": {
13+
"name": "sourcemeta-one",
14+
"version": "1.0.0"
15+
}
16+
}
17+
}
18+
],
19+
"type": "object",
20+
"required": [ "jsonrpc", "id", "result" ],
21+
"properties": {
22+
"jsonrpc": {
23+
"const": "2.0"
24+
},
25+
"id": {
26+
"type": [ "string", "integer" ]
27+
},
28+
"result": {
29+
"type": "object",
30+
"required": [ "protocolVersion", "capabilities", "serverInfo" ],
31+
"properties": {
32+
"protocolVersion": {
33+
"const": "2025-11-25"
34+
},
35+
"capabilities": {
36+
"type": "object",
37+
"additionalProperties": false
38+
},
39+
"serverInfo": {
40+
"type": "object",
41+
"required": [ "name", "version" ],
42+
"properties": {
43+
"name": {
44+
"type": "string"
45+
},
46+
"version": {
47+
"type": "string"
48+
},
49+
"title": {
50+
"type": "string"
51+
}
52+
},
53+
"additionalProperties": false
54+
}
55+
},
56+
"additionalProperties": false
57+
}
58+
},
59+
"additionalProperties": false
60+
}

0 commit comments

Comments
 (0)