Skip to main content
Glama

Search Posts

search_posts
Read-only

按时间和/或关键词检索公开帖子。① 只给时间(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

NameRequiredDescriptionDefault
limitNo返回条数,1-50,默认 20。
sinceNo起始时间(含)。YYYY-MM-DD 按北京时间当天 00:00 解释;也可传带时区的 ISO 时间戳,如 2026-10-25T08:00:00+08:00。
untilNo结束时间。传纯日期时含当天整天,如 until=2026-10-25 表示到 25 日 24:00 为止。
keywordNo检索关键词(匹配帖子正文)。省略则只按时间倒序返回帖子流。
since_hoursNo相对当前时间往前推的小时数,如 24 表示过去 24 小时。与 since 二选一;同时给时以本参数为准。

Output Schema

NameRequiredDescriptionDefault
viewYes
countYes
postsYes
totalYes
keywordYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the readOnly/non-destructive annotations: it discloses the ordering rule per mode (time desc vs. keyword hit-count ranking), the no-filter default of the 20 newest site-wide posts, Beijing-time day semantics for since/until with until inclusive, and the warning not to assume results are fresh because each item carries its real publish time. It also tells the agent to report honestly when the window is empty — real behavioral guidance an agent could not infer from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then cleanly enumerated ① time-only / ② keyword / ③ neither, followed by parameter notes. Some of the trailing time-parameter explanation duplicates the schema text and could be trimmed without loss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description need not explain return shape, and it still covers the remaining ambiguities an agent would hit: default result count, sort order per mode, timezone interpretation, inclusivity of until, and empty-result handling. Nothing needed for a correct call is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the timezone/until-inclusive/since_hours-precedence details largely restate the schema. What the description genuinely adds is mode-level parameter semantics: which parameters to combine for a chronological feed vs. relevance ranking, and that keyword matches post body and ranks by hit count within the window — meaning absent from the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (检索公开帖子) plus the three operating modes, so an agent can immediately tell it apart from siblings like get_post_detail, get_post_replies, or my_posts which operate on a single post or a user's own posts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete user-question triggers for the time-only mode (「最近有什么新帖」「今天社区在聊什么」「10 月 25 日那天发了什么」) and defines what happens when keyword is supplied or nothing is supplied. It stops short of naming sibling alternatives (e.g. 'for a specific user's posts use my_posts'), so routing is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.