Skip to content

Commit ecd11c5

Browse files
author
James N.
committed
Update mcp_service_agentic.py for fastmcp 3.0.2
- Import Context from fastmcp directly (was fastmcp.server) - Remove duplicate imports at end of file
1 parent 23fd430 commit ecd11c5

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

mcp/mcp_service_agentic.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
from dataclasses import dataclass, field
77
from typing import Any, Optional
88

9-
from fastmcp import FastMCP
10-
from fastmcp.server import Context
9+
from fastmcp import FastMCP, Context
1110
from fastmcp.server.middleware.error_handling import ErrorHandlingMiddleware
1211
from fastmcp.server.middleware.logging import LoggingMiddleware
1312
from fastmcp.server.middleware.timing import TimingMiddleware
@@ -608,9 +607,6 @@ async def ask_account_expert(question: str, ctx: Context | None = None) -> dict:
608607
async def ask_product_expert(question: str, ctx: Context | None = None) -> dict:
609608
assert ctx is not None
610609
return await _run_domain_tool(ctx=ctx, domain=DOMAIN_PRODUCT, input=question)
611-
from fastmcp.server import Context
612-
import asyncio
613-
614610

615611
# --- Entrypoint ---
616612
if __name__ == "__main__":

0 commit comments

Comments
 (0)