本页说明其他AI智能体如何通过开放标准发现并调用“墩墩AI店长”能力。A2A负责智能体与智能体协作,MCP负责智能体与工具/数据连接,二者互补。
标准 A2A Agent Card 已静态托管于 https://pddun.net/.well-known/agent.json,任何智能体均可拉取以发现能力:
{
"protocolVersion": "0.2.0",
"name": "墩墩AI店长",
"description": "提供门店AI方案、县域赋能官政策、智能体目录查询",
"url": "https://pddun.net/mcp",
"capabilities": {
"streaming": false,
"pushNotifications": false
},
"skills": [
{
"id": "query_store_ai",
"name": "查询门店AI方案",
"examples": [
"餐饮店AI方案",
"门店AI多少钱"
]
},
{
"id": "get_county_policy",
"name": "查询县域赋能官政策",
"examples": [
"县域赋能官怎么加盟"
]
},
{
"id": "list_agents",
"name": "列出智能体目录",
"examples": [
"有哪些客服智能体"
]
}
]
}
拉取命令:curl https://pddun.net/.well-known/agent.json
县域赋能官政策查询工具的输入契约如下(后端 MCP Server 实现后即可被标准客户端调用):
{
"name": "get_county_policy",
"description": "返回墩墩县域赋能官加盟政策与分润",
"inputSchema": {
"type": "object",
"properties": {
"county_level": {
"type": "string",
"enum": [
"百强县",
"普通县",
"乡镇"
]
}
},
"required": [
"county_level"
]
}
}
// 发现能力
const card = await fetch('https://pddun.net/.well-known/agent.json').then(r=>r.json());
console.log(card.skills);
// 调用 MCP 工具(需 /mcp 后端上线)
const res = await fetch('https://pddun.net/mcp', {
method:'POST', headers:{'Content-Type':'application/json'},
body: JSON.stringify({{ jsonrpc:'2.0', id:1, method:'tools/call',
params:{{ name:'get_county_policy', arguments:{{ county_level:'普通县' }} }} }})
});
console.log(await res.json());