Skip to content

Commit cda1273

Browse files
committed
chore: clean up docs, fix naming, and improve safety
- Remove outdated eval_basic_mcp_use section from README - Fix naming inconsistency in adk_mcp.py (pydantic -> adk) - Improve model costs parsing safety with restricted eval - Fix mermaid diagram string formatting - Add new evaluation scripts and results directory
1 parent f9b894b commit cda1273

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ This project aims to teach:
6060
- `oai-agent_mcp.py` - Example of using MCP with OpenAI Agents
6161
- `pydantic_mcp.py` - Example of using MCP with Pydantic-AI
6262

63-
- **eval_basic_mcp_use/** - Contains evaluation examples for single MCP usage:
64-
- `evals_adk_mcp.py` - Evaluation of MCP with Google's ADK
65-
- `evals_langchain_mcp.py` - Evaluation of MCP with LangGraph
66-
- `evals_pydantic_mcp.py` - Evaluation of MCP with Pydantic-AI
6763

6864
- **[agents_mcp_usage/multi_mcp/](agents_mcp_usage/multi_mcp/)** - Advanced multi-MCP server integration examples
6965
- **multi_mcp_use/** - Contains examples of using multiple MCP servers simultaneously:

agents_mcp_usage/basic_mcp/basic_mcp_use/adk_mcp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ async def main(query: str = "Greet Andrew and give him the current time") -> Non
4141
# Create the agent
4242
root_agent = LlmAgent(
4343
model="gemini-2.5-pro-preview-03-25",
44-
name="mcp_pydantic_assistant",
44+
name="mcp_adk_assistant",
4545
tools=tools,
4646
)
4747

4848
# Set up session
4949
session_service = InMemorySessionService()
5050
session = session_service.create_session(
51-
app_name="mcp_pydantic_app",
51+
app_name="mcp_adk_app",
5252
user_id="aginns",
5353
)
5454

5555
# Create the runner
5656
runner = Runner(
57-
app_name="mcp_pydantic_app",
57+
app_name="mcp_adk_app",
5858
agent=root_agent,
5959
session_service=session_service,
6060
)

agents_mcp_usage/multi_mcp/eval_multi_mcp/merbench_ui.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ def load_model_costs(file_path: str) -> tuple[Dict, Dict]:
5555
return {}, {}
5656

5757
# Safely evaluate the dictionary strings
58-
model_costs_raw = eval(costs_match.group(1), {"float": float})
58+
# Handle float('inf') which ast.literal_eval cannot parse
59+
costs_string = costs_match.group(1)
60+
costs_string = costs_string.replace("float('inf')", "float('inf')")
61+
# Use eval with restricted globals for this specific case
62+
model_costs_raw = eval(costs_string, {"__builtins__": {}, "float": float})
5963

6064
# Extract friendly names from the inline entries
6165
friendly_names = {}

agents_mcp_usage/multi_mcp/mermaid_diagrams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
```
199199
"""
200200

201-
valid_mermaid_diagram = """`
201+
valid_mermaid_diagram = """
202202
```mermaid
203203
graph LR
204204
User((User)) --> |"Run script<br>(e.g., pydantic_mcp.py)"| Agent

0 commit comments

Comments
 (0)