360 Secure SkillHub
360 安全技能中心

Dynamic Tool

该 Skill 是一份工具选择策略:在调用大量工具前,把最新用户消息交给 get_recommended_tools,返回推荐工具名数组与简短提示。内置天气→exec、搜索→web_search、文档→飞书文档、读写文件→read/write 等意图映射,用于压缩上下文并避免同一轮重复调用工具。

peter7397
peter7397
热度 87.09
最近更新 2026-05-11 17:29:48
分类:自动化依赖:MCP 服务 / 代码执行 / 第三方 API应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add tooldyn
Metadata
name
dynamic-tool-policy
description
Intent-based tool selection. Activate when you want to know which tools are relevant for the current user message (weather→exec, document→feishu_doc, search→web_search). Reduces context and avoids tool loops.

Dynamic Tool Policy

When to use: Before calling many tools, or when the user message is about weather, search, documents, or Feishu — call get_recommended_tools with the latest user message to get a short list of recommended tools and a hint.

Intent mapping:

  • 天气 / weather / wttr → use exec (e.g. curl wttr.in/<city>?format=3)
  • 搜索 / search → use web_search once, then reply; do not call web_search again in the same turn
  • 文档 / create doc / 飞书文档 → use feishu_doc only when the user explicitly asks for a document
  • 读文件 / read file → read; 写/编辑 → write

Tool: get_recommended_tools({ user_message }) → returns recommended_tools (array of tool names) and hint (short instruction).