Inbox injection endpoint: POST /api/messages + MCP inject_message (#12) (#18)
CI / build + unit (push) Successful in 1m14s
CI / build + unit (push) Successful in 1m14s
This commit was merged in pull request #18.
This commit is contained in:
@@ -77,6 +77,15 @@ export function createMeshMcpServer(mesh: MeshService): McpServer {
|
||||
async () => jsonResult(mesh.messages()),
|
||||
);
|
||||
|
||||
server.registerTool(
|
||||
'inject_message',
|
||||
{
|
||||
description: `Synthetic inbox injection for external triggers: records an rx entry in the message history as if received on the mesh — NOT sent over RF, nothing goes to the bridge or air. Appears in get_messages like any other rx record (channel 0). from is optional (integer in 1..0xffffffff); empty text or invalid from are tool errors.${CHANNEL_NOTE}`,
|
||||
inputSchema: { text: z.string(), from: z.number().int().optional() },
|
||||
},
|
||||
async ({ text, from }) => jsonResult(mesh.injectMessage(text, from)),
|
||||
);
|
||||
|
||||
server.registerTool(
|
||||
'get_telemetry',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user