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

Method registerCommand

app/src/API/CommandRegistry.cpp:106–115  ·  view source on GitHub ↗

* @brief Register a new command handler */

Source from the content-addressed store, hash-verified

104 * @brief Register a new command handler
105 */
106void API::CommandRegistry::registerCommand(const QString& name,
107 const QString& description,
108 CommandFunction handler)
109{
110 CommandDefinition def;
111 def.name = name;
112 def.description = description;
113 def.handler = std::move(handler);
114 m_commands.insert(name, def);
115}
116
117/**
118 * @brief Register a new command handler with a JSON Schema for MCP tool metadata

Calls

no outgoing calls

Tested by

no test coverage detected