Native AI Tools 工作流承接
Native AI Tools 让 Agent 用 Claude Code 原生工具习惯操作项目文档。当前版本要求:能真实执行的工具直接执行;需要外部能力承接的工具必须调用已配置工作流;未配置时明确返回“尚未设置对应的工作流,无法执行”。
工作流绑定
项目配置:
json
{
"nativeAiTools": {
"workflows": {
"Agent": { "targetDocumentId": "...", "targetDeploymentId": "..." },
"WebFetch": { "targetDocumentId": "...", "targetDeploymentId": "..." },
"WebSearch": { "targetDocumentId": "...", "targetDeploymentId": "..." },
"ScheduleWakeup": { "targetDocumentId": "...", "targetDeploymentId": "..." }
}
}
}如果同一项同时配置文档和部署,优先使用部署。目标必须属于当前项目。
承接输入
Agent
json
{
"description": "short task name",
"prompt": "full task",
"subagent_type": "optional type",
"model": "sonnet",
"run_in_background": false,
"name": "optional agent name",
"team_name": "optional team name",
"mode": "default",
"isolation": "worktree"
}WebFetch
json
{
"url": "https://example.com",
"prompt": "question about the page"
}WebSearch
json
{
"query": "search query",
"allowed_domains": ["example.com"],
"blocked_domains": ["spam.example"]
}ScheduleWakeup
json
{
"delaySeconds": 300,
"prompt": "resume instruction",
"reason": "why this delay is needed"
}返回结果
承接工作流执行完成后返回:
json
{
"status": "success",
"output": {
"blockName": "block output"
}
}未覆盖能力应返回“当前暂无该功能”或“当前尚未开放权限”,不能返回模拟成功。