def update_user(
    user_id: str, name: Optional[str] = None, email: Optional[str] = None
) -> Dict:
    """Update a user to test triggering resource changes."""
    global users

    if user_id not in users:
        raise ValueError(f"User {user_id} not found")

    if name is not None:
        users[user_id]["name"] = name
    if email is not None:
        users[user_id]["email"] = email

    users[user_id]["last_updated"] = time.time()
    return users[user_id]
Update a user to test triggering resource changes.
llama-index-integrations/tools/llama-index-tools-mcp/tests/server.py