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

Method send

src/communications/destination_script.py:16–32  ·  view source on GitHub ↗
(self, title, body, files=None)

Source from the content-addressed store, hash-verified

14 self._communicator = _create_communicator(params_dict, process_invoker)
15
16 def send(self, title, body, files=None):
17 environment_variables = None
18
19 if isinstance(body, dict):
20 parameters = list(body.values())
21 environment_variables = values_to_string(dict(body))
22 elif isinstance(body, list):
23 parameters = body
24 else:
25 raise Exception('Only dict or list bodies are supported')
26
27 parameters = values_to_string(parameters)
28
29 if files:
30 raise Exception('Files are not supported for scripts')
31
32 self._communicator.send(parameters, environment_variables=environment_variables)
33
34 def __str__(self, *args, **kwargs):
35 return type(self).__name__ + ' for ' + str(self._communicator)

Callers

nothing calls this directly

Calls 1

values_to_stringFunction · 0.90

Tested by

no test coverage detected