From 34e00404e9561dcaf8d2d99df7470757a4fee915 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Wed, 1 Jul 2026 00:17:40 +0900 Subject: tool description最適化 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mcp/tools/search_messages.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/mcp/tools/search_messages.c') 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; } -- cgit v1.2.3