a2aproject / a2aproject/a2a-samples

Bug in pure mcp example (missing tool name)

未關閉 適合新手
#438 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
1.8k
分支
751
PR 合併指標
30 天內沒有已合併 PR

描述

### What happened?

https://github.com/a2aproject/a2a-samples/blob/f140c6d5bc90297f448fdf73ab4b32c16f7cf60c/samples/python/agents/a2a-mcp-without-framework/src/no_llm_framework/server/agent.py#L153

but in jinja

https://github.com/a2aproject/a2a-samples/blob/f140c6d5bc90297f448fdf73ab4b32c16f7cf60c/samples/python/agents/a2a-mcp-without-framework/src/no_llm_framework/server/called_tools_history.jinja#L2

In jinja, should use "tool.tool" instead to avoid missing tool name in history? (or agent.py should use "name" as key?)

### Relevant log output

```shell
After writting the rendered template, currently the prompt looks like the following

...
Previous tools have been called.
- Tool:
- Arguments: {...
```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

貢獻指南

開啟貢獻指南

研究方向

The issue points to two files: agent.py line 153 and called_tools_history.jinja line 2. Compare the data structure passed from agent.py (likely a dictionary with a 'tool' key) with the variable accessed in the Jinja template (currently 'tool.name'). Determine whether to change the key in the Python data or the variable in the template to make the tool name appear. Run the example to see the missing tool name in the prompt output.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend-api-design
Issue 類型
缺陷
難度
1/5
預估耗時
1 小時以內
活躍度
停滯
描述清晰度
描述清楚
新手友好度
75/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。