MCPcopy Create free account
hub / github.com/bugy/script-server / config_to_external

Function config_to_external

src/model/external_model.py:12–30  ·  view source on GitHub ↗
(config, id, external_id=None)

Source from the content-addressed store, hash-verified

10
11
12def config_to_external(config, id, external_id=None):
13 parameters = []
14 for parameter in config.parameters:
15 external_param = parameter_to_external(parameter)
16
17 if external_param is None:
18 continue
19
20 parameters.append(external_param)
21
22 return {
23 'id': id,
24 'clientModelId': external_id,
25 'name': config.name,
26 'description': config.description,
27 'schedulable': config.schedulable,
28 'parameters': parameters,
29 'outputFormat': config.output_format
30 }
31
32
33def parameter_to_external(parameter):

Callers

nothing calls this directly

Calls 2

parameter_to_externalFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected