Skip to main content
Glama
MediaCrawler MCP Server

MediaCrawler MCP Server

by CubericW

search_posts

Search public posts and comments by keyword on a chosen Chinese social platform and return normalized results with post metadata, URLs, and crawl warnings.

Instructions

Keyword-search a platform and return matching public posts (+comments).

Args: platform: one of xhs, dy, ks, bili, wb, tieba, zhihu. keywords: search query. Multiple keywords may be comma-separated. max_count: max posts to fetch (default from config, hard-capped). with_comments: include comments (default from config). sort: optional sort hint (platform-dependent; may be ignored).

Returns a dict: {ok, platform, count, items:[{id, author, content, like_count, comment_count, publish_time, url, comments?}], raw_files, warnings}. items holds only what this call crawled; raw_files are MediaCrawler's per-day files, which also hold every earlier crawl of that day.

Browser crawls run one at a time across every project on this machine, so this call first waits for any crawl ahead of it (queue_wait_seconds says how long). If that wait outlasts MEDIACRAWLER_QUEUE_TIMEOUT, ok is false and error is "queue_timeout".

If the crawl fails and saves nothing, ok is false, error is "crawl_failed" and details gives the reason. If it stops after saving some results, ok stays true with partial: true and the reason in warnings. ok: true with count 0 means the crawl finished without finding anything; check warnings.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "platform": "<platform>",
      "keywords": "<keywords>"
    },
    "name": "search_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNo
keywordsYes
platformYes
max_countNo
with_commentsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses single-crawl serialization across the machine, queue waiting and the MEDIACRAWLER_QUEUE_TIMEOUT failure path, crawl_failed vs. partial:true semantics, and that count 0 with ok:true is not necessarily an error. These are exactly the behaviors an agent needs to interpret results correctly.

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 purpose, then Args, then Returns, then failure modes — a scannable structure with no filler. Slightly verbose in the return-dict enumeration and the repeated 'default from config' phrasing, but nothing that harms comprehension.

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?

For a 5-parameter crawl tool with an output schema, the description covers inputs, return shape, partial-vs-failed outcomes, and the queue contention constraint. An agent could call this correctly and interpret every documented outcome without further information.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: it enumerates the valid platform values (xhs, dy, ks, bili, wb, tieba, zhihu, which the schema leaves as a bare string), explains comma-separated multi-keyword syntax, notes max_count is hard-capped and config-defaulted, and warns that sort is platform-dependent and may be ignored.

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

Purpose4/5

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

The first sentence gives a specific verb and resource ('Keyword-search a platform and return matching public posts (+comments)'), which is distinct from get_post_detail or get_creator_posts. It does not explicitly name the siblings it differs from, so it falls short of a 5.

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

Usage Guidelines3/5

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

Usage is implied by the name and the platform/keyword framing, but there is no explicit 'use this when…' statement or routing to get_post_detail / get_creator_posts for detail or per-author lookups. The sort caveat ('may be ignored') is the only conditional guidance offered.

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