Search Posts
search_posts按时间和/或关键词检索公开帖子。① 只给时间(since_hours,或 since/until):返回该时段的帖子流,按发布时间倒序——用户问「最近有什么新帖」「今天社区在聊什么」「10 月 25 日那天发了什么」时用这个。② 给了 keyword:在该时段内按关键词命中次数排序,取最相关的帖子。③ 时间与关键词都不给:返回全站最新发布的 20 条。时间参数:since_hours=24 表示过去 24 小时(相对现在计算);since/until 用 YYYY-MM-DD 表示北京时间自然日,until 含当天。每条结果都带真实发布时间,请据此判断新旧,不要假定拿到的都是新内容;结果为空就如实说该时段无帖。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 返回条数,1-50,默认 20。 | |
| since | No | 起始时间(含)。YYYY-MM-DD 按北京时间当天 00:00 解释;也可传带时区的 ISO 时间戳,如 2026-10-25T08:00:00+08:00。 | |
| until | No | 结束时间。传纯日期时含当天整天,如 until=2026-10-25 表示到 25 日 24:00 为止。 | |
| keyword | No | 检索关键词(匹配帖子正文)。省略则只按时间倒序返回帖子流。 | |
| since_hours | No | 相对当前时间往前推的小时数,如 24 表示过去 24 小时。与 since 二选一;同时给时以本参数为准。 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | ||
| count | Yes | ||
| posts | Yes | ||
| total | Yes | ||
| keyword | Yes |