Skip to main content
Glama

gather_research_data

Collects real job-market data across target and comparison companies to produce a structured research report, including source status and data gaps for career analysis.

Instructions

批量抓取真实市场数据并生成调研报告(调研步核心动作,一次调用完成)。

Args: jd_specs: JD 抓取范围 JSON 数组,目标 1 家 + 对照 2-4 家,如 [{"company": "字节", "limit": 6}, {"company": "boss", "city": "北京", "limit": 6}]; company 支持别名(字节/boss/官方源id),其余键原样透传给对应源(city/keyword/limit…) case_query: 同学历案例查询 JSON 对象,如 {"role": "AI Agent 开发", "education": "双非本", "company": "字节", "kind": "both"} ——education 用五档四层写法(985/211/双非/专科 × 博/硕/本/专) direction: 报告标题与档案归档使用的方向名(默认取 case_query.role) city: 报告上下文城市(默认取 case_query.city / want / who) boss_confirmed: 范围含 BOSS 直聘时必须先问用户,用户同意后传 true。 「是否抓 BOSS」与「是否扫码登录」合并为一次同意:未确认返回 CONFIRMATION_REQUIRED;确认但未登录返回 ACTION_REQUIRED (next_tool=boss_login),不再追问第二次。用户同意后直接调用 boss_login(action="login")(用户只需扫码),登录成功后浏览器保持常开。 source_timeout: 单源超时秒数(默认 25,也可用环境变量 CAREER_KIT_RESEARCH_SOURCE_TIMEOUT 配置);单源失败会自动重试 1 次。 max_sources: 单次调用最多执行的源数量(默认 4)。展开后的源超过该值时, 只执行前 max_sources 个源,其余写入返回的 batch.deferred_specs, 由调用方再调一次完成剩余来源;<=0 表示不额外限制(仍受内部上限保护)。

Returns: 汇报文本:样本统计 + 来源成功/失败 + 报告完整路径(控制台入口) + 数据缺口 + 下一步衔接分析。报告内容 100% 代码渲染自抓取数据(不经 LLM)。

纪律:

  • 详情必抓:每条岗位抓取正文(description/requirements);无详情岗位直接剔除, 剔除数量进来源面板与数据缺口(没有详情的岗位对调研没有价值)

  • BOSS 例外:detail_status=list_only 的行保留薪资/公司/地点/技能,不补详情不剔除; list_only 数量进来源面板、counts 与数据缺口,需要全文时用 fetch_jd_detail 补抓

  • 任一源失败不中断;失败原因进报告「来源状态面板」如实展示

  • BOSS 抓取前必须先问用户(boss_confirmed=true 才算确认);含 BOSS 时先 boss_login(action="status"),未就绪直接 boss_login(action="login"),登录成功后 再调用 gather_research_data,不要先跑批再补登录;不再二次询问是否登录; 登录成功后窗口常驻、切成功页、不自动关闭,命令仅作兜底

  • 全部失败时返回可读错误并引导 import_jd / import_jd_file,绝不编造

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": "gather_research_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNo
jd_specsNo
directionNo
case_queryNo
max_sourcesNo
boss_confirmedNo
source_timeoutNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

With zero annotations the description carries the full burden and does so: per-source timeout of 25s with one automatic retry, one failed source never aborting the run, the max_sources cap deferring overflow into batch.deferred_specs, and the CONFIRMATION_REQUIRED / ACTION_REQUIRED error codes with next_tool=boss_login. It additionally discloses that the report is 100% code-rendered from scraped data, that the browser stays open after login, and that detail-less postings are dropped and counted as data gaps.

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?

Well front-loaded with a one-line purpose, then Args, Returns and a discipline list, so an agent can skim to what it needs. It loses a point for redundancy: the BOSS confirmation-then-login sequence is restated in both the boss_confirmed parameter and the 纪律 block (不再追问第二次 / 不再二次询问是否登录).

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 seven-parameter orchestration tool with no annotations, the definition covers orchestration order, failure handling, partial-completion continuation via deferred_specs, and the no-fabrication guarantee. Although an output schema exists, the described error codes and next-step handoff (下一步衔接分析) add value the schema alone would not convey.

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 coverage is 0% and every field is typed as a bare string or scalar, so the description is the only source of semantics — and it supplies concrete JSON examples for jd_specs and case_query, notes company alias support, explains that extra keys are passed through verbatim to each source, defines the five-tier education encoding, and documents defaults for direction, city, source_timeout and max_sources (including <=0 meaning no extra limit).

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 (批量抓取真实市场数据并生成调研报告) and explicitly scopes it as the core research-step action completed in one call. It distinguishes itself from siblings by name — fetch_jd_detail for list-only backfill, import_jd/import_jd_file as the fallback when scraping fails, and boss_login for the login prerequisite.

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 explicit when-to-use and ordering rules: confirm BOSS with the user first, call boss_login(status) before the batch, and never run the batch then patch in a login. It also names the fallback path when every source fails (import_jd / import_jd_file) rather than leaving the agent to invent data.

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