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

Function parameter_to_external

src/model/external_model.py:33–57  ·  view source on GitHub ↗
(parameter)

Source from the content-addressed store, hash-verified

31
32
33def parameter_to_external(parameter):
34 if parameter.constant:
35 return None
36
37 return {
38 'name': parameter.name,
39 'description': parameter.description,
40 'withoutValue': parameter.no_value,
41 'required': parameter.required,
42 'default': parameter.create_value_wrapper_for_default().user_value,
43 'type': parameter.type,
44 'min': parameter.min,
45 'max': parameter.max,
46 'max_length': parameter.max_length,
47 'regex': parameter.regex,
48 'values': parameter.get_ui_values(),
49 'secure': parameter.secure,
50 'fileRecursive': parameter.file_recursive,
51 'fileType': parameter.file_type,
52 'requiredParameters': parameter.get_required_parameters(),
53 'ui': {
54 'widthWeight': parameter.ui_width_weight,
55 'separatorBefore': parameter.ui_separator._asdict() if parameter.ui_separator else None
56 }
57 }
58
59
60def to_short_execution_log(history_entries, running_script_ids=None):

Callers 4

on_addMethod · 0.90
on_removeMethod · 0.90
config_to_externalFunction · 0.85

Calls 3

get_ui_valuesMethod · 0.80

Tested by

no test coverage detected