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/read_messages.c | |
| parent | a44fd4cf3a0c3d7ae33b7664341a0a9bff07aaaa (diff) | |
tool description最適化
Diffstat (limited to 'src/mcp/tools/read_messages.c')
| -rw-r--r-- | src/mcp/tools/read_messages.c | 26 |
1 files changed, 22 insertions, 4 deletions
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; } |
