refactor(workday): finalize modular structure and verify triple-tool suite (WIS-011, WIS-020)

This commit is contained in:
nathan 2026-04-03 11:54:40 -04:00
parent 2d96e0fc89
commit aa7238889e
3 changed files with 71 additions and 70 deletions

View File

View 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",
},
}

View File

@ -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]: