google / google/adk-python

Support Grounding Metadata / Citation Propagation in in mcp_tool class

Aperta
#6,081 4 commenti 0 reazioni 1 assegnatario Rivendicata da @sanketpatil06 Vedi su GitHub
mcp tools
Lingua principale
Python
Stelle
21.5k
Fork
4k
Merge medio
1g 14h
PR unite (30g)
37

Descrizione

** Please make sure you read the contribution guide and file the issues in the right place. **
[Contribution guide.](https://google.github.io/adk-docs/contributing-guide/)

### Is your feature request related to a specific problem?

I don't know how to propagate grounding_metadata / sources from an MCP tool response into the LlmResponse class.

### Describe the Solution You'd Like

It seems like the `propagate_grounding_metadata` feature of `agent_tool` would be a good way to achieve this in `mcp_tool`: https://github.com/google/adk-python/blob/7e8965d33182f43433a3ab5596e625a3cb824f62/src/google/adk/tools/agent_tool.py#L129

### Impact on your work

When I register an ADK agent in Gemini Enterprise, that uses `mcp_tool`, the sources from the MCP server are stripped out when the LlmResponse is built and sent back to the GE UI.

### Willingness to contribute

No

---

## 🟡 Recommended Information

### Describe Alternatives You've Considered

Something like this: https://github.com/google/adk-python/issues/1693#issuecomment-3690142647

### Proposed API / Implementation

It seems like the `propagate_grounding_metadata` feature of `agent_tool` would be a good way to achieve this in `mcp_tool`: https://github.com/google/adk-python/blob/7e8965d33182f43433a3ab5596e625a3cb824f62/src/google/adk/tools/agent_tool.py#L129

### Additional Context

N/A

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.