AI Agent与外部工具交互的标准化通信协议
在OpenClaw中,Tool Calling Protocol通过`tools`配置实现。每个Skill通过SKILL.md声明可用工具,Agent根据任务需求自动选择并调用。例如,web_search工具通过协议层处理搜索参数、执行查询、格式化结果。
```yaml
# OpenClaw Skill中的工具声明
tools:
- name: web_search
description: "搜索网页内容"
parameters:
query:
type: string
description: "搜索关键词"
count:
type: number
default: 5
returns:
type: array
items:
type: object
properties:
title: {{type: string}}
url: {{type: string}}
snippet: {{type: string}}
```