blob: 0309ea5a575fe585baff951b63ab562efb5868ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "mcp/tools/health.h"
#include <mcpc/ucbr.h>
static void
health_call(const mcpc_tool_t *tool, mcpc_ucbr_t *result)
{
(void)tool;
mcpc_ucbr_toolcall_add_text_printf8(result, (const char8_t *)"ok");
}
mcpc_tool_t *
tiny_convmem_health_tool_create(void)
{
mcpc_tool_t *tool = mcpc_tool_new2(
(const char8_t *)"health",
(const char8_t *)"Check whether the tiny conversation memory server is running"
);
if (tool == NULL)
{
return NULL;
}
if (mcpc_tool_set_call_cb(tool, health_call) != MCPC_EC_0)
{
return NULL;
}
return tool;
}
|