File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed
contributing/samples/mcp_postgres_agent Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change 1515import os
1616
1717from dotenv import load_dotenv
18- from google .adk .models .gemma_llm import Gemma
19- from google .genai .types import GenerateContentConfig
20-
2118from google .adk .agents .llm_agent import LlmAgent
2219from google .adk .tools .mcp_tool import StdioConnectionParams
2320from google .adk .tools .mcp_tool .mcp_toolset import MCPToolset
21+ from google .genai .types import GenerateContentConfig
2422from mcp import StdioServerParameters
2523
2624load_dotenv ()
3533 "Use the provided tools to query, manage, and interact with "
3634 "the PostgreSQL database. Ask clarifying questions when unsure."
3735 ),
38-
3936 tools = [
4037 MCPToolset (
4138 connection_params = StdioConnectionParams (
4239 server_params = StdioServerParameters (
43- command = 'uvx' ,
44- args = [
45- 'postgres-mcp' ,
46- '--access-mode=unrestricted'
47- ],
48- env = {
49- "DATABASE_URI" : POSTGRES_CONNECTION_STRING
50- }
40+ command = "uvx" ,
41+ args = ["postgres-mcp" , "--access-mode=unrestricted" ],
42+ env = {"DATABASE_URI" : POSTGRES_CONNECTION_STRING },
5143 ),
5244 timeout = 60 ,
5345 ),
5648 generate_content_config = GenerateContentConfig (
5749 temperature = 1.0 ,
5850 top_p = 0.95 ,
59- )
51+ ),
6052)
You can’t perform that action at this time.
0 commit comments