Skip to content

Commit a61d7f2

Browse files
committed
review-pr-comments
1 parent f0b5340 commit a61d7f2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

contributing/samples/mcp_postgres_agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Once the agent is running, try these queries:
5454
The agent uses:
5555
- **Model**: Gemini 2.0 Flash
5656
- **MCP Server**: `postgres-mcp` (via `uvx`)
57-
- **Access Mode**: Unrestricted (allows read/write operations)
57+
- **Access Mode**: Unrestricted (allows read/write operations). **Warning**: Using unrestricted mode in a production environment can pose significant security risks. It is recommended to use a more restrictive access mode or configure database user permissions appropriately for production use.
5858
- **Connection**: StdioConnectionParams with 60-second timeout
5959
- **Environment Variable**: `DATABASE_URI` (mapped from `POSTGRES_CONNECTION_STRING`)
6060

contributing/samples/mcp_postgres_agent/agent.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
load_dotenv()
2525

2626
POSTGRES_CONNECTION_STRING = os.getenv("POSTGRES_CONNECTION_STRING")
27+
if not POSTGRES_CONNECTION_STRING:
28+
raise ValueError(
29+
"POSTGRES_CONNECTION_STRING environment variable not set. "
30+
"Please create a .env file with this variable."
31+
)
2732

2833
root_agent = LlmAgent(
2934
model="gemini-2.0-flash",
@@ -46,7 +51,7 @@
4651
)
4752
],
4853
generate_content_config=GenerateContentConfig(
49-
temperature=1.0,
54+
temperature=0.2,
5055
top_p=0.95,
5156
),
5257
)

0 commit comments

Comments
 (0)