Skip to main content
Glama

reddit_search_comments

Read-only

Search Reddit by comment text to find posts where a topic appears in replies, not just titles. Returns parent posts since Reddit doesn't expose matching comment bodies.

Instructions

Search Reddit by COMMENT text. Reddit's comment search matches your keyword against comment bodies but returns the PARENT POSTS, not the individual comments, so each result is a post whose discussion mentions your query, carrying that post's title, selftext, score, and comment count. Use it to surface threads where a topic comes up in the replies that plain post-title search would miss. Reddit does not expose which specific comment matched or its text, so this returns posts, not comment bodies. For the actual comment bodies, use reddit_deep_comment_search. Example: q='best mechanical keyboard' sort='top'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query text. Supports Reddit search syntax (e.g. `subreddit:webdev`, `author:spez`, `"exact phrase"`, `title:...`).
tNoTime window that bounds which posts the search returns, e.g. 'week' = only posts from the past week. Unlike a subreddit listing, search applies this to the 'relevance' and 'top' sorts too. When omitted, Reddit defaults to 'all', so a broad 'relevance' query surfaces old high-upvote posts that only loosely match. Pass 'week' or 'month' to keep results recent and on-topic.
nsfwNoSet 'true' to include over-18 / NSFW results. Omit or 'false' to exclude them (default).
sortNoSort order for search. 'relevance' = best match (default), 'top' = highest score in the `t` window, 'new' = most recent, 'hot' = trending, 'comments' = most-discussed.
afterNoOpaque pagination cursor. Pass back the previous response's `after` value EXACTLY as it was returned; the format is not stable and a hand-written Reddit fullname loses the paging depth the cursor carries. Omit on the first call. When `after` comes back null there is no next page to request, and that does NOT reliably mean you have every item: Reddit often stops serving a busy listing long before it runs out. Read `listing_status` on that final response instead. It is `complete`, `truncated` or `unknown`, and ONLY `complete` means nothing is missing. Never report `truncated` or `unknown` to a user as the end of the data; say the answer is partial and widen across sorts, timeframes or search terms.
limitNoMax items to return (1 to 100). The API clamps out-of-range values; endpoint default applies if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.3
    • changedInput schema / properties / after / description
      Previous value: -"Opaque Reddit pagination cursor from the previous response's `after` field (a fullname like `t3_abc123`). Omit on the first call; pass it to fetch the next page."New value: +"Opaque pagination cursor. Pass back the previous response's `after` value EXACTLY as it was returned; the format is not stable and a hand-written Reddit fullname loses the paging depth the cursor carries. Omit on the first call. When `after` comes back null there is no next page to request, and that does NOT reliably mean you have every item: Reddit often stops serving a busy listing long before it runs out. Read `listing_status` on that final response instead. It is `complete`, `truncated` or `unknown`, and ONLY `complete` means nothing is missing. Never report `truncated` or `unknown` to a user as the end of the data; say the answer is partial and widen across sorts, timeframes or search terms."
  2. First observedv0.1.12

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover safety (readOnly, non-destructive, openWorld); the description adds the crucial behavioral fact that Reddit does not expose which comment matched or its text, so the payload is posts rather than comment bodies. That is non-obvious return-shape behavior an agent would otherwise get wrong.

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 surprising behavior first, then usage, then routing, then example. Slightly redundant in restating the posts-not-comments point twice ('returns the PARENT POSTS' and 'this returns posts, not comment bodies'), but each block still earns its place.

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 no output schema, the description must convey the return shape, and it does (post title, selftext, score, comment count). Combined with the routing to reddit_deep_comment_search, an agent has everything needed to call and interpret this tool correctly.

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

Parameters3/5

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

Schema description coverage is 100%, including detailed semantics for t, sort, after, and limit, so the schema carries the parameter burden. The description only adds a usage example (q='best mechanical keyboard' sort='top'), which is marginal beyond the schema. Baseline 3 is appropriate.

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+resource (search Reddit by comment text) and immediately disambiguates the counterintuitive semantics: results are parent posts, not comments. It names both related siblings (reddit_search via 'plain post-title search', reddit_deep_comment_search) so an agent can distinguish it without opening other schemas.

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

Usage Guidelines5/5

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

Gives an explicit use case ('surface threads where a topic comes up in the replies that plain post-title search would miss') and an explicit alternative for the adjacent need ('For the actual comment bodies, use reddit_deep_comment_search'). This is exactly the when/when-not/alternative structure.

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