google / google/adk-python

Support Grounding Metadata / Citation Propagation in in mcp_tool class

Open
#6,081 4 comments 0 reactions 1 assignee Claimed by @sanketpatil06 View on GitHub
mcp tools
Dominant language
Python
Stars
21.5k
Forks
4k
Avg merge
1d 14h
Merged PRs (30d)
37

Description

** 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.