diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-06-29 01:28:01 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-06-29 01:28:01 +0900 |
| commit | 8d38b06f11c713e547d70468340242f23322152c (patch) | |
| tree | 566b4c658d7d0157c0cec4da490b37aa747a2d4e /src/mcp/tools/health.c | |
first commit
Diffstat (limited to 'src/mcp/tools/health.c')
| -rw-r--r-- | src/mcp/tools/health.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mcp/tools/health.c b/src/mcp/tools/health.c new file mode 100644 index 0000000..0309ea5 --- /dev/null +++ b/src/mcp/tools/health.c @@ -0,0 +1,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; +} |
