MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / send_command

Method send_command

examples/API Test/test_api.py:367–380  ·  view source on GitHub ↗
(
        self,
        command: str,
        params: Optional[dict] = None,
        request_id: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

365 )
366
367 def send_command(
368 self,
369 command: str,
370 params: Optional[dict] = None,
371 request_id: Optional[str] = None,
372 ) -> Optional[dict]:
373 msg = {
374 "type": MessageType.COMMAND,
375 "id": request_id or str(uuid.uuid4()),
376 "command": command,
377 }
378 if params:
379 msg["params"] = params
380 return self.send_json(msg)
381
382 def send_batch(
383 self, commands: list[dict], request_id: Optional[str] = None

Callers 8

test_protocolFunction · 0.80
test_command_registryFunction · 0.80
test_smokeFunction · 0.80
test_blocked_commandsFunction · 0.80
cmd_sendFunction · 0.80
cmd_listFunction · 0.80
cmd_interactiveFunction · 0.80
cmd_monitorFunction · 0.80

Calls 1

send_jsonMethod · 0.95

Tested by

no test coverage detected