summaryrefslogtreecommitdiff
path: root/src/mcp/tools/read_messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mcp/tools/read_messages.c')
-rw-r--r--src/mcp/tools/read_messages.c26
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;
}