Skip to content

Commit db7f9e7

Browse files
committed
embed template in basic arg type, simpler k/v input for headers and env vars
1 parent 6e35e82 commit db7f9e7

File tree

2 files changed

+51
-67
lines changed

2 files changed

+51
-67
lines changed

api/README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
7777
],
7878
"environment_variables": [
7979
{
80-
"type": "named",
81-
"name": "LOG_LEVEL",
80+
"key": "LOG_LEVEL",
8281
"description": "Logging level (debug, info, warn, error)",
8382
"default": "info"
8483
}
@@ -90,9 +89,10 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
9089
"version": "1.0.2",
9190
"runtime_arguments": [
9291
{
93-
"type": "template",
92+
"type": "named",
9493
"description": "Mount a volume into the container",
95-
"template": "--mount=type=bind,src={source_path},dst={target_path}",
94+
"flag": "--mount",
95+
"value": "type=bind,src={source_path},dst={target_path}",
9696
"is_required": true,
9797
"is_repeated": true,
9898
"variables": {
@@ -115,11 +115,10 @@ GET /v0/servers/a5e8a7f0-d4e4-4a1d-b12f-2896a23fd4f1?version=0.0.3
115115
"name": "target_dir",
116116
"value": "/project",
117117
}
118-
]
118+
],
119119
"environment_variables": [
120120
{
121-
"type": "named",
122-
"name": "LOG_LEVEL",
121+
"key": "LOG_LEVEL",
123122
"description": "Logging level (debug, info, warn, error)",
124123
"default": "info"
125124
}
@@ -163,8 +162,7 @@ API Response:
163162
"version": "1.0.2",
164163
"environment_variables": [
165164
{
166-
"type": "named",
167-
"name": "BRAVE_API_KEY",
165+
"key": "BRAVE_API_KEY",
168166
"description": "Brave Search API Key",
169167
"is_required": true,
170168
"is_secret": true
@@ -217,9 +215,10 @@ API Response:
217215
"version": "1.0.2",
218216
"runtime_arguments": [
219217
{
220-
"type": "template",
218+
"type": "named",
221219
"description": "Mount a volume into the container",
222-
"template": "--mount=type=bind,src={source_path},dst={target_path}",
220+
"flag": "--mount",
221+
"value": "type=bind,src={source_path},dst={target_path}",
223222
"is_required": true,
224223
"is_repeated": true,
225224
"variables": {
@@ -255,7 +254,7 @@ claude_desktop_config.json:
255254
"server": "@modelcontextprotocol/servers/src/[email protected]",
256255
"package": "docker",
257256
"settings": {
258-
"mount_config": [
257+
"--mount": [
259258
{ "source_path": "/Users/username/Desktop", "target_path": "/project/desktop" },
260259
{ "source_path": "/path/to/other/allowed/dir", "target_path": "/project/other/allowed/dir,ro" },
261260
]

api/openapi.yaml

Lines changed: 40 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,18 @@ components:
184184
type: array
185185
description: List of arguments passed to the package's runtime command (such as docker or npx).
186186
items:
187-
$ref: '#/components/schemas/Input'
187+
$ref: '#/components/schemas/Argument'
188188
package_arguments:
189189
type: array
190190
description: List of arguments passed to the package's binary.
191191
items:
192-
$ref: '#/components/schemas/Input'
192+
$ref: '#/components/schemas/Argument'
193193
environment_variables:
194194
type: array
195195
items:
196-
anyOf:
197-
- $ref: '#/components/schemas/NamedInput'
198-
- $ref: '#/components/schemas/TemplateInput'
196+
$ref: '#/components/schemas/KeyValueInput'
199197

200-
UserInput:
198+
Input:
201199
type: object
202200
properties:
203201
description:
@@ -213,7 +211,7 @@ components:
213211
default: string
214212
value:
215213
type: string
216-
description: The default value for the input. If this is not set, the user will be asked to provide a value.
214+
description: The default value for the input. If this is not set, the user will be asked to provide a value. If the `variables` property is provided, then values wrapped in `{curly_braces}` will be replaced with the corresponding variables.
217215
is_secret:
218216
type: boolean
219217
description: Whether the input is a secret value (e.g., password, token). If true, clients should handle the value securely.
@@ -228,10 +226,21 @@ components:
228226
type: string
229227
example: []
230228

231-
PositionalInput:
229+
InputWithVariables:
230+
allOf:
231+
- $ref: '#/components/schemas/Input'
232+
- type: object
233+
properties:
234+
variables:
235+
type: object
236+
description: A map of variable names to their values. Keys in the input `value` wrapped in `{curly_braces}` will be replaced with the corresponding variables.
237+
additionalProperties:
238+
$ref: '#/components/schemas/Input'
239+
240+
PositionalArgument:
232241
description: A positional input is a value inserted verbatim into the command line.
233242
allOf:
234-
- $ref: '#/components/schemas/UserInput'
243+
- $ref: '#/components/schemas/InputWithVariables'
235244
- type: object
236245
required:
237246
- type
@@ -243,72 +252,50 @@ components:
243252
example: "positional"
244253
name:
245254
type: string
246-
description: Name of the positional argument. This is not part of the command line, but can be used for reference by client configuration.
255+
description: Name of the positional argument. This is not part of the command line, but can be used for reference by client configuration and used to hint users.
247256
example: file_path
248257
is_repeated:
249258
type: boolean
250259
description: Whether the input can be repeated multiple times in the command line.
251260
default: false
252261

253-
NamedInput:
254-
description: A command-line `--flag={value}`, named environment variable or header.
262+
NamedArgument:
263+
description: A command-line `--flag={value}`.
255264
allOf:
256-
- $ref: '#/components/schemas/UserInput'
265+
- $ref: '#/components/schemas/InputWithVariables'
257266
- type: object
258267
required:
259268
- type
260-
- name
269+
- flag
261270
properties:
262271
type:
263272
type: string
264273
enum: [named]
265274
example: "named"
266-
name:
275+
flag:
267276
type: string
268277
example: "--port"
269278
is_repeated:
270279
type: boolean
271-
description: Whether the argument or header can be repeated multiple times. Has no effect for environment variables.
280+
description: Whether the argument can be repeated multiple times. Has no effect for environment variables.
272281
default: false
273282

274-
TemplateInput:
275-
- type: object
276-
required:
277-
- type
278-
- template
279-
- name
280-
properties:
281-
type:
282-
type: string
283-
enum: [template]
284-
name:
285-
type: string
286-
example: mount_config
287-
description: The name of the input, which can be used by clients as an identifier to reference the input. For environment variables and headers, this is the environment variable or header names. For arguments, this is solely for reference and not part of the command line.
288-
description:
289-
description: A description of the input, which can be used by clients to provide context to the user.
290-
type: string
291-
is_required:
292-
type: boolean
293-
default: false
294-
is_repeated:
295-
type: boolean
296-
description: Whether the argument or header can be repeated multiple times. Has no effect for environment variables.
297-
default: false
298-
template:
299-
type: string
300-
description: The template string that will be used to generate the value. Values wrapped in `{curly_braces}` will be replaced with the corresponding variables. Input which is not `is_required` is replaced with its `default` value, or otherwise an empty string.
301-
example: "--mount=type=bind,src={host_path},dst={container_path}"
302-
variables:
303-
type: object
304-
additionalProperties:
305-
$ref: '#/components/schemas/UserInput'
283+
KeyValueInput:
284+
allOf:
285+
- $ref: '#/components/schemas/InputWithVariables'
286+
- type: object
287+
required:
288+
- name
289+
properties:
290+
key:
291+
type: string
292+
description: Name of the header or environment variable.
293+
example: SOME_VARIABLE
306294

307-
Input:
295+
Argument:
308296
anyOf:
309-
- $ref: '#/components/schemas/PositionalInput'
310-
- $ref: '#/components/schemas/NamedInput'
311-
- $ref: '#/components/schemas/TemplateInput'
297+
- $ref: '#/components/schemas/PositionalArgument'
298+
- $ref: '#/components/schemas/NamedArgument'
312299

313300
Remote:
314301
type: object
@@ -327,9 +314,7 @@ components:
327314
headers:
328315
type: array
329316
items:
330-
anyOf:
331-
- $ref: '#/components/schemas/NamedInput'
332-
- $ref: '#/components/schemas/TemplateInput'
317+
$ref: '#/components/schemas/KeyValueInput'
333318

334319
ServerDetail:
335320
allOf:

0 commit comments

Comments
 (0)