refactor(workday): finalize modular structure and verify triple-tool suite (WIS-011, WIS-020)
This commit is contained in:
parent
2d96e0fc89
commit
aa7238889e
0
Workday/workday-mcp/lib/__init__.py
Normal file
0
Workday/workday-mcp/lib/__init__.py
Normal file
69
Workday/workday-mcp/lib/data.py
Normal file
69
Workday/workday-mcp/lib/data.py
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
from typing import Any
|
||||||
|
|
||||||
|
# Mock dataset with reporting-line relationships for manager checks (WIS-017 prep)
|
||||||
|
MOCK_WORKERS: dict[str, dict[str, Any]] = {
|
||||||
|
"EMP001": {
|
||||||
|
"name": "Nathan",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "IT",
|
||||||
|
"email": "nathan@example.com",
|
||||||
|
"manager_id": "EMP010",
|
||||||
|
},
|
||||||
|
"EMP002": {
|
||||||
|
"name": "Terminated User",
|
||||||
|
"status": "Terminated",
|
||||||
|
"dept": "Sales",
|
||||||
|
"email": "user2@example.com",
|
||||||
|
"manager_id": "EMP020",
|
||||||
|
},
|
||||||
|
"EMP003": {
|
||||||
|
"name": "Alicia",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "IT",
|
||||||
|
"email": "alicia@example.com",
|
||||||
|
"manager_id": "EMP010",
|
||||||
|
},
|
||||||
|
"EMP004": {
|
||||||
|
"name": "Jordan",
|
||||||
|
"status": "Leave",
|
||||||
|
"dept": "Finance",
|
||||||
|
"email": "jordan@example.com",
|
||||||
|
"manager_id": "EMP030",
|
||||||
|
},
|
||||||
|
"EMP010": {
|
||||||
|
"name": "Priya Manager",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "IT",
|
||||||
|
"email": "priya@example.com",
|
||||||
|
"manager_id": "EMP100",
|
||||||
|
},
|
||||||
|
"EMP020": {
|
||||||
|
"name": "Ramon Director",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "Sales",
|
||||||
|
"email": "ramon@example.com",
|
||||||
|
"manager_id": "EMP100",
|
||||||
|
},
|
||||||
|
"EMP030": {
|
||||||
|
"name": "Morgan Lead",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "Finance",
|
||||||
|
"email": "morgan@example.com",
|
||||||
|
"manager_id": "EMP100",
|
||||||
|
},
|
||||||
|
"EMP100": {
|
||||||
|
"name": "Chief Exec",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "Executive",
|
||||||
|
"email": "ceo@example.com",
|
||||||
|
"manager_id": "",
|
||||||
|
},
|
||||||
|
# Intentional unresolved manager reference for mismatch test scenarios
|
||||||
|
"EMP777": {
|
||||||
|
"name": "Mismatch Case",
|
||||||
|
"status": "Active",
|
||||||
|
"dept": "Operations",
|
||||||
|
"email": "mismatch@example.com",
|
||||||
|
"manager_id": "EMP999",
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -1,76 +1,8 @@
|
|||||||
from mcp.server.fastmcp import FastMCP
|
from mcp.server.fastmcp import FastMCP
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
from lib.data import MOCK_WORKERS
|
||||||
|
|
||||||
# This stays the same - it's your server's identity
|
mcp = FastMCP("Workday-Sync") #Server name for MCP registration, e.g. "Workday-Sync"
|
||||||
mcp = FastMCP("Workday-Sync")
|
|
||||||
|
|
||||||
# Mock dataset with reporting-line relationships for manager checks (WIS-017 prep)
|
|
||||||
MOCK_WORKERS: dict[str, dict[str, str]] = {
|
|
||||||
"EMP001": {
|
|
||||||
"name": "Nathan",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "IT",
|
|
||||||
"email": "nathan@example.com",
|
|
||||||
"manager_id": "EMP010",
|
|
||||||
},
|
|
||||||
"EMP002": {
|
|
||||||
"name": "Terminated User",
|
|
||||||
"status": "Terminated",
|
|
||||||
"dept": "Sales",
|
|
||||||
"email": "user2@example.com",
|
|
||||||
"manager_id": "EMP020",
|
|
||||||
},
|
|
||||||
"EMP003": {
|
|
||||||
"name": "Alicia",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "IT",
|
|
||||||
"email": "alicia@example.com",
|
|
||||||
"manager_id": "EMP010",
|
|
||||||
},
|
|
||||||
"EMP004": {
|
|
||||||
"name": "Jordan",
|
|
||||||
"status": "Leave",
|
|
||||||
"dept": "Finance",
|
|
||||||
"email": "jordan@example.com",
|
|
||||||
"manager_id": "EMP030",
|
|
||||||
},
|
|
||||||
"EMP010": {
|
|
||||||
"name": "Priya Manager",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "IT",
|
|
||||||
"email": "priya@example.com",
|
|
||||||
"manager_id": "EMP100",
|
|
||||||
},
|
|
||||||
"EMP020": {
|
|
||||||
"name": "Ramon Director",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "Sales",
|
|
||||||
"email": "ramon@example.com",
|
|
||||||
"manager_id": "EMP100",
|
|
||||||
},
|
|
||||||
"EMP030": {
|
|
||||||
"name": "Morgan Lead",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "Finance",
|
|
||||||
"email": "morgan@example.com",
|
|
||||||
"manager_id": "EMP100",
|
|
||||||
},
|
|
||||||
"EMP100": {
|
|
||||||
"name": "Chief Exec",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "Executive",
|
|
||||||
"email": "ceo@example.com",
|
|
||||||
"manager_id": "",
|
|
||||||
},
|
|
||||||
# Intentional unresolved manager reference for mismatch test scenarios
|
|
||||||
"EMP777": {
|
|
||||||
"name": "Mismatch Case",
|
|
||||||
"status": "Active",
|
|
||||||
"dept": "Operations",
|
|
||||||
"email": "mismatch@example.com",
|
|
||||||
"manager_id": "EMP999",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
@mcp.tool()
|
@mcp.tool()
|
||||||
def get_worker_status(employee_id: str) -> dict[str, Any]:
|
def get_worker_status(employee_id: str) -> dict[str, Any]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user