用途:该技能用于以紧凑方式访问 RCSB PDB 数据,覆盖核心元数据、Search API 查询和 FASTA 下载,并默认返回简明的 Markdown 摘要。
主要能力:所有 RCSB PDB 与 Search API 调用统一通过 scripts/rest_request.py 执行。核心元数据使用 base_url=https://data.rcsb.org/rest/v1;Search API 使用 https://search.rcsb.org/rcsbsearch/v2;FASTA 下载使用 https://www.rcsb.org。核心条目或 assembly 查询通常不需要 max_items;Search API 结果建议将分页 rows 设为约 10,并设置 max_items=10。FASTA 下载使用 response_format=text,可返回简短 text_head,除非请求原始输出。
使用方式:从标准输入读取一个 JSON 对象,必需字段为 base_url、path;可选字段包括 method、params、headers、json_body、form_body、record_path、response_format、max_items、max_depth、timeout_sec、save_raw、raw_output_path。示例:echo '{"base_url":"https://data.rcsb.org/rest/v1","path":"core/entry/4hhb"}' | python scripts/rest_request.py。成功返回 ok、source、path、method、status_code、warnings,以及紧凑记录、摘要或 text_head;失败返回 ok=false 及 error.code、error.message。save_raw=true 时使用 raw_output_path。
限制与注意:长对话中应重新发起请求,不要依赖旧的工具输出;工具预览中的省略号是界面截断,不是请求内容。是否支持批量、缓存或更高层封装等资料暂未提供。