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/read_messages.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/mcp/tools/read_messages.c') diff --git a/src/mcp/tools/read_messages.c b/src/mcp/tools/read_messages.c index 1581534..44a026f 100644 --- a/src/mcp/tools/read_messages.c +++ b/src/mcp/tools/read_messages.c @@ -318,11 +318,29 @@ call_read_messages(const mcpc_tool_t *tool, mcpc_ucbr_t *result) bool tiny_mcp_register_read_messages(mcpc_server_t *server) { - mcpc_tool_t *tool = tiny_mcp_tool_new("read_messages", "Read a session page", call_read_messages); - return tool && tiny_mcp_tool_add_property(tool, "session_id", "Session ID", MCPC_U8STR, true) + mcpc_tool_t *tool + = tiny_mcp_tool_new("read_messages", + "Read persisted messages from one known session in chronological order. " + "Returns a paginated history for reconstructing that conversation.", + call_read_messages); + return tool + && tiny_mcp_tool_add_property(tool, + "session_id", + "Conversation session whose chronological history to read.", + MCPC_U8STR, + true) && tiny_mcp_tool_add_property( - tool, "limit", "Optional page limit from 1 to 1000; defaults to 100", MCPC_I32, false) + tool, + "limit", + "Maximum messages to return in this page, from 1 to 1000; defaults to 100.", + MCPC_I32, + false) && tiny_mcp_tool_add_property( - tool, "cursor", "Optional opaque page cursor", MCPC_U8STR, false) + tool, + "cursor", + "Opaque nextCursor returned by a previous read_messages call; " + "omit for the first page.", + MCPC_U8STR, + false) && mcpc_server_add_tool(server, tool) == MCPC_EC_0; } -- cgit v1.2.3