Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions enterprise/e2e/html/hurl/mcp-2025-06-18.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jsonpath "$.result.instructions" matches "^.+$"
# Added in 2025-11-25
# https://modelcontextprotocol.io/specification/2025-11-25/changelog
jsonpath "$.result.serverInfo.description" not exists
jsonpath "$.result.serverInfo.websiteUrl" not exists

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
```
Expand Down
4 changes: 4 additions & 0 deletions enterprise/e2e/html/hurl/mcp-2025-11-25-gzip.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}"
jsonpath "$.result.instructions" matches "^This is an instance of Sourcemeta One"

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down Expand Up @@ -130,6 +132,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}"
jsonpath "$.result.instructions" matches "^This is an instance of Sourcemeta One"

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
2 changes: 2 additions & 0 deletions enterprise/e2e/html/hurl/mcp-2025-11-25-lifecycle.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}"
jsonpath "$.result.instructions" == "This is an instance of Sourcemeta One named \"Sourcemeta\" (The next-generation JSON Schema platform). Sourcemeta One is a JSON Schema registry. It serves a catalog of JSON Schemas organized as a tree of directories. Every schema is exposed as an MCP resource via the `JSON Schema` resource template (see `resources/templates/list`) and is addressable by its canonical absolute URI. Use `tools/list` to discover the operations this catalog exposes. Learn more at https://one.sourcemeta.com"

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
4 changes: 2 additions & 2 deletions enterprise/e2e/html/hurl/mcp-2025-11-25-resources.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jsonpath "$.result.resources[28].uri" == "{{base}}/self/v1/schemas/mcp/initializ
jsonpath "$.result.resources[28].name" == "response"
jsonpath "$.result.resources[28].description" == "Sourcemeta One's response to a client's initialization"
jsonpath "$.result.resources[28].mimeType" == "application/schema+json"
jsonpath "$.result.resources[28].size" == 2174
jsonpath "$.result.resources[28].size" == 2482
jsonpath "$.result.resources[29].uri" == "{{base}}/self/v1/schemas/mcp/notifications/cancelled"
jsonpath "$.result.resources[29].name" == "cancelled"
jsonpath "$.result.resources[29].description" == "Cancellation hint from a client for an in-flight request. Sourcemeta One accepts and discards these"
Expand Down Expand Up @@ -223,7 +223,7 @@ jsonpath "$.result.resources[40].uri" == "{{base}}/self/v1/schemas/mcp/response"
jsonpath "$.result.resources[40].name" == "response"
jsonpath "$.result.resources[40].description" == "Any outgoing MCP response the server returns"
jsonpath "$.result.resources[40].mimeType" == "application/schema+json"
jsonpath "$.result.resources[40].size" == 3117
jsonpath "$.result.resources[40].size" == 3215
jsonpath "$.result.resources[41].uri" == "{{base}}/self/v1/schemas/mcp/tools/call/request"
jsonpath "$.result.resources[41].name" == "request"
jsonpath "$.result.resources[41].description" == "Request from a client to invoke an MCP tool by name"
Expand Down
1 change: 1 addition & 0 deletions enterprise/e2e/path/hurl/mcp-2025-06-18.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jsonpath "$.result.instructions" matches "^.+$"
# Added in 2025-11-25
# https://modelcontextprotocol.io/specification/2025-11-25/changelog
jsonpath "$.result.serverInfo.description" not exists
jsonpath "$.result.serverInfo.websiteUrl" not exists

POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}}
```
Expand Down
4 changes: 4 additions & 0 deletions enterprise/e2e/path/hurl/mcp-2025-11-25-gzip.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}/v1/catalog"
jsonpath "$.result.instructions" matches "^This is an instance of Sourcemeta One"

POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down Expand Up @@ -130,6 +132,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}/v1/catalog"
jsonpath "$.result.instructions" matches "^This is an instance of Sourcemeta One"

POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
2 changes: 2 additions & 0 deletions enterprise/e2e/path/hurl/mcp-2025-11-25-lifecycle.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}/v1/catalog"
jsonpath "$.result.instructions" == "This is an instance of Sourcemeta One named \"Sourcemeta\" (The next-generation JSON Schema platform). Sourcemeta One is a JSON Schema registry. It serves a catalog of JSON Schemas organized as a tree of directories. Every schema is exposed as an MCP resource via the `JSON Schema` resource template (see `resources/templates/list`) and is addressable by its canonical absolute URI. Use `tools/list` to discover the operations this catalog exposes. Learn more at https://one.sourcemeta.com"

POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
4 changes: 2 additions & 2 deletions enterprise/e2e/path/hurl/mcp-2025-11-25-resources.all.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jsonpath "$.result.resources[28].uri" == "{{base}}/v1/catalog/self/v1/schemas/mc
jsonpath "$.result.resources[28].name" == "response"
jsonpath "$.result.resources[28].description" == "Sourcemeta One's response to a client's initialization"
jsonpath "$.result.resources[28].mimeType" == "application/schema+json"
jsonpath "$.result.resources[28].size" == 2185
jsonpath "$.result.resources[28].size" == 2493
jsonpath "$.result.resources[29].uri" == "{{base}}/v1/catalog/self/v1/schemas/mcp/notifications/cancelled"
jsonpath "$.result.resources[29].name" == "cancelled"
jsonpath "$.result.resources[29].description" == "Cancellation hint from a client for an in-flight request. Sourcemeta One accepts and discards these"
Expand Down Expand Up @@ -223,7 +223,7 @@ jsonpath "$.result.resources[40].uri" == "{{base}}/v1/catalog/self/v1/schemas/mc
jsonpath "$.result.resources[40].name" == "response"
jsonpath "$.result.resources[40].description" == "Any outgoing MCP response the server returns"
jsonpath "$.result.resources[40].mimeType" == "application/schema+json"
jsonpath "$.result.resources[40].size" == 3128
jsonpath "$.result.resources[40].size" == 3226
jsonpath "$.result.resources[41].uri" == "{{base}}/v1/catalog/self/v1/schemas/mcp/tools/call/request"
jsonpath "$.result.resources[41].name" == "request"
jsonpath "$.result.resources[41].description" == "Request from a client to invoke an MCP tool by name"
Expand Down
9 changes: 7 additions & 2 deletions src/index/explorer.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,13 @@ struct GENERATE_MCP {
initialize_ingredients.push_back(
sourcemeta::core::JSON{sourcemeta::one::version()});
initialize_ingredients.push_back(sourcemeta::core::JSON{SERVER_TITLE});
initialize_ingredients.push_back(sourcemeta::core::JSON{""});
initialize_ingredients.push_back(sourcemeta::core::JSON{""});
initialize_ingredients.push_back(sourcemeta::core::JSON{
configuration.html.has_value()
? std::string_view{configuration.html->description}
: std::string_view{}});
initialize_ingredients.push_back(sourcemeta::core::JSON{
configuration.html.has_value() ? std::string_view{configuration.url}
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serverInfo.websiteUrl is derived from configuration.url without trimming a trailing /, while template_uri is normalized to remove it. If the configured url ends with /, this can lead to inconsistent URLs being advertised (and potentially brittle tests/clients).

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

: std::string_view{}});
initialize_ingredients.push_back(
sourcemeta::core::JSON{instructions.str()});

Expand Down
12 changes: 11 additions & 1 deletion src/self/v1/schemas/mcp/initialize/response.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"serverInfo": {
"name": "sourcemeta-one-enterprise",
"title": "Sourcemeta One Enterprise",
"version": "1.0.0"
"version": "1.0.0",
"description": "A JSON Schema registry",
"websiteUrl": "https://example.com"
},
"instructions": "Server instructions"
}
Expand Down Expand Up @@ -68,6 +70,14 @@
},
"version": {
"type": "string"
},
"description": {
"type": "string",
"minLength": 1
},
"websiteUrl": {
"type": "string",
"format": "uri"
}
},
"additionalProperties": false
Expand Down
4 changes: 3 additions & 1 deletion src/self/v1/schemas/mcp/response.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
"serverInfo": {
"name": "sourcemeta-one-enterprise",
"title": "Sourcemeta One Enterprise",
"version": "1.0.0"
"version": "1.0.0",
"description": "A JSON Schema registry",
"websiteUrl": "https://example.com"
},
"instructions": "Server instructions"
}
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/empty/hurl/mcp-2025-11-25.community.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}"
jsonpath "$.result.instructions" == "This is an instance of Sourcemeta One named \"Sourcemeta\" (The next-generation JSON Schema platform). Sourcemeta One is a JSON Schema registry. It serves a catalog of JSON Schemas organized as a tree of directories. Every schema is exposed as an MCP resource via the `JSON Schema` resource template (see `resources/templates/list`) and is addressable by its canonical absolute URI. Use `tools/list` to discover the operations this catalog exposes. Learn more at https://one.sourcemeta.com"

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/headless/hurl/mcp-2025-11-25.community.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" not exists
jsonpath "$.result.serverInfo.websiteUrl" not exists
jsonpath "$.result.instructions" == "This is an instance of Sourcemeta One. Sourcemeta One is a JSON Schema registry. It serves a catalog of JSON Schemas organized as a tree of directories. Every schema is exposed as an MCP resource via the `JSON Schema` resource template (see `resources/templates/list`) and is addressable by its canonical absolute URI. Use `tools/list` to discover the operations this catalog exposes. Learn more at https://one.sourcemeta.com"

POST {{base}}/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/path/hurl/mcp-2025-11-25.community.hurl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jsonpath "$.result.capabilities.resources" isEmpty
jsonpath "$.result.serverInfo.name" == "sourcemeta-one"
jsonpath "$.result.serverInfo.title" == "Sourcemeta One"
jsonpath "$.result.serverInfo.version" matches "^.+$"
jsonpath "$.result.serverInfo.description" == "The next-generation JSON Schema platform"
jsonpath "$.result.serverInfo.websiteUrl" == "{{base}}/v1/catalog"
jsonpath "$.result.instructions" == "This is an instance of Sourcemeta One named \"Sourcemeta\" (The next-generation JSON Schema platform). Sourcemeta One is a JSON Schema registry. It serves a catalog of JSON Schemas organized as a tree of directories. Every schema is exposed as an MCP resource via the `JSON Schema` resource template (see `resources/templates/list`) and is addressable by its canonical absolute URI. Use `tools/list` to discover the operations this catalog exposes. Learn more at https://one.sourcemeta.com"

POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}}
Expand Down
Loading