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
4 changes: 4 additions & 0 deletions schemas/server-definition.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@
"type": "string",
"description": "Help text for this input"
},
"default": {
"type": "string",
"description": "Default value for this input (used when user provides no value)"
},
"placeholder": {
"type": "string",
"description": "Placeholder text"
Expand Down
13 changes: 13 additions & 0 deletions tests/schema-validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ describe("Server Definition Schema", () => {
it.each([
{ id: "com.example-test", name: "Test", transport: { type: "stdio", command: "echo" } },
{ id: "com.example-remote", name: "Remote", transport: { type: "http", url: "https://example.com/mcp" } },
{
id: "com.example-defaults", name: "Defaults Test",
transport: {
type: "stdio", command: "node", args: ["server.js"],
env: { "LOG_LEVEL": "${input:LOG_LEVEL}" },
metadata: {
inputs: [
{ id: "LOG_LEVEL", label: "Log Level", type: "text", required: false, default: "info" },
{ id: "API_KEY", label: "API Key", type: "password", required: true, secret: true },
],
},
},
},
])("validates valid server definition: $id", (data) => {
expect(validate(data)).toBe(true);
});
Expand Down