diff options
| author | tanaka takashi <isazaka@gmail.com> | 2026-07-01 00:17:40 +0900 |
|---|---|---|
| committer | tanaka takashi <isazaka@gmail.com> | 2026-07-01 00:17:40 +0900 |
| commit | 34e00404e9561dcaf8d2d99df7470757a4fee915 (patch) | |
| tree | b16e2fd6a5f9b0eb1f7019cb7967b4edcd97cc13 /src/mcp/tools/search_messages.c | |
| parent | a44fd4cf3a0c3d7ae33b7664341a0a9bff07aaaa (diff) | |
tool description最適化
Diffstat (limited to 'src/mcp/tools/search_messages.c')
| -rw-r--r-- | src/mcp/tools/search_messages.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/mcp/tools/search_messages.c b/src/mcp/tools/search_messages.c index d20d7b2..44db1ef 100644 --- a/src/mcp/tools/search_messages.c +++ b/src/mcp/tools/search_messages.c @@ -127,11 +127,29 @@ call_search_messages(const mcpc_tool_t *tool, mcpc_ucbr_t *result) bool tiny_mcp_register_search_messages(mcpc_server_t *server) { - mcpc_tool_t *tool = tiny_mcp_tool_new("search_messages", "Search messages", call_search_messages); - return tool && tiny_mcp_tool_add_property(tool, "query", "Search text", MCPC_U8STR, true) + mcpc_tool_t *tool + = tiny_mcp_tool_new("search_messages", + "Search persisted message content and tags by text relevance. Use it to " + "recall matching information globally or within one session.", + call_search_messages); + return tool && tiny_mcp_tool_add_property( - tool, "session_id", "Optional session ID; omitted searches all", MCPC_U8STR, false) + tool, + "query", + "UTF-8 text to match against persisted message content and tags.", + MCPC_U8STR, + true) && tiny_mcp_tool_add_property( - tool, "limit", "Optional result limit from 1 to 100; defaults to 20", MCPC_I32, false) + tool, + "session_id", + "Conversation session to search; omit to search across all sessions.", + MCPC_U8STR, + false) + && tiny_mcp_tool_add_property( + tool, + "limit", + "Maximum ranked matches to return, from 1 to 100; defaults to 20.", + MCPC_I32, + false) && mcpc_server_add_tool(server, tool) == MCPC_EC_0; } |
