Skip to content

Commit 66bc081

Browse files
committed
Onboarding changes to avoid agent confusion.
1 parent 0499433 commit 66bc081

File tree

2 files changed

+117
-24
lines changed

2 files changed

+117
-24
lines changed

src/mcp_server/mcp_server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
factory.register_service(TechSupportService())
3333
factory.register_service(MarketingService())
3434
factory.register_service(ProductService())
35-
factory.register_service(GeneralService())
35+
36+
# General service has tests for llm to mcp connectivity
37+
#factory.register_service(GeneralService())
3638

3739
# Register DataToolService with the dataset path
3840
#factory.register_service(DataToolService(dataset_path="datasets"))

src/mcp_server/services/hr_service.py

Lines changed: 114 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,122 @@ def register_tools(self, mcp) -> None:
1919
"""Register HR tools with the MCP server."""
2020

2121
@mcp.tool(tags={self.domain.value})
22-
async def onboard_employee() -> str:
23-
"""Always use the following onboarding checklist for all new Contoso employees. These are the ONLY steps needed to onboard any new employee."""
24-
onboarding_checklist = """
25-
26-
## HR representative must...
27-
- initiate background check
28-
- schedule orientation session
29-
- assign a mentor
30-
- register for benefits
31-
- provide employee handbook
32-
- request ID card
33-
- set up payroll
34-
35-
## Technical Support representative must...
36-
- setup Office 365 account
37-
- configure laptop
38-
- setup VPN access
39-
- create system accounts
40-
- send welcome email
41-
42-
## No other onboarding steps are required for any employee
43-
22+
async def employee_onboarding_blueprint_flat(
23+
employee_name: str | None = None,
24+
start_date: str | None = None,
25+
role: str | None = None
26+
) -> dict:
27+
"""
28+
Ultra-minimal onboarding blueprint (flat list).
29+
Agent usage:
30+
1. Call this first when onboarding intent detected.
31+
2. Filter steps to its own domain.
32+
3. Execute in listed order while honoring depends_on.
4433
"""
45-
return f"Here are the necessary steps to onboard a new Contoso employee: {onboarding_checklist}. These are the ONLY steps needed to onboard any new employee. Do not add any additional steps."
34+
return {
35+
"version": "1.0",
36+
"intent": "employee_onboarding",
37+
"employee": {
38+
"name": employee_name,
39+
"start_date": start_date,
40+
"role": role
41+
},
42+
"steps": [
43+
# Pre-boarding
44+
{
45+
"id": "bg_check",
46+
"domain": "HR",
47+
"action": "Initiate background check",
48+
"tool": "initiate_background_check",
49+
"required": True,
50+
"params": ["employee_name", "check_type?"]
51+
},
52+
{
53+
"id": "configure_laptop",
54+
"domain": "TECH_SUPPORT",
55+
"action": "Provision and configure laptop",
56+
"tool": "configure_laptop",
57+
"required": True
58+
},
59+
{
60+
"id": "create_accounts",
61+
"domain": "TECH_SUPPORT",
62+
"action": "Create system accounts",
63+
"tool": "create_system_accounts",
64+
"required": True
65+
},
66+
67+
# Day 1
68+
{
69+
"id": "orientation",
70+
"domain": "HR",
71+
"action": "Schedule orientation session",
72+
"tool": "schedule_orientation_session",
73+
"required": True,
74+
"depends_on": ["bg_check"],
75+
"params": ["employee_name", "date"]
76+
},
77+
{
78+
"id": "handbook",
79+
"domain": "HR",
80+
"action": "Provide employee handbook",
81+
"tool": "provide_employee_handbook",
82+
"required": True,
83+
"params": ["employee_name"]
84+
},
85+
{
86+
"id": "welcome_email",
87+
"domain": "TECH_SUPPORT",
88+
"action": "Send welcome email",
89+
"tool": "send_welcome_email",
90+
"required": False,
91+
"depends_on": ["create_accounts"]
92+
},
4693

94+
# Week 1
95+
{
96+
"id": "mentor",
97+
"domain": "HR",
98+
"action": "Assign mentor",
99+
"tool": "assign_mentor",
100+
"required": False,
101+
"params": ["employee_name", "mentor_name?"]
102+
},
103+
{
104+
"id": "vpn",
105+
"domain": "TECH_SUPPORT",
106+
"action": "Set up VPN access",
107+
"tool": "setup_vpn_access",
108+
"required": False,
109+
"depends_on": ["create_accounts"]
110+
},
111+
{
112+
"id": "benefits",
113+
"domain": "HR",
114+
"action": "Register employee for benefits",
115+
"tool": "register_for_benefits",
116+
"required": True,
117+
"params": ["employee_name", "benefits_package?"]
118+
},
119+
{
120+
"id": "payroll",
121+
"domain": "HR",
122+
"action": "Set up payroll",
123+
"tool": "set_up_payroll",
124+
"required": True,
125+
"params": ["employee_name", "salary?"]
126+
},
127+
{
128+
"id": "id_card",
129+
"domain": "HR",
130+
"action": "Request ID card",
131+
"tool": "request_id_card",
132+
"required": False,
133+
"depends_on": ["bg_check"],
134+
"params": ["employee_name", "department?"]
135+
}
136+
]
137+
}
47138
@mcp.tool(tags={self.domain.value})
48139
async def schedule_orientation_session(employee_name: str, date: str) -> str:
49140
"""Schedule an orientation session for a new employee."""

0 commit comments

Comments
 (0)